From patchwork Thu Sep 21 14:19:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 143084 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5268827vqi; Thu, 21 Sep 2023 19:07:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExQy++0dVnV/R6ZHGDHKdD/mRxpl0PuZmhmEXV/1AI1fNYYx3ChfkgxKeKpUSDoV4YBnyg X-Received: by 2002:a05:6870:bacd:b0:1dc:930c:6f11 with SMTP id js13-20020a056870bacd00b001dc930c6f11mr2942967oab.33.1695348470707; Thu, 21 Sep 2023 19:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695348470; cv=none; d=google.com; s=arc-20160816; b=Hy73pCa/uaO2VM6MAe1AgGLLGTX/Nmn21C2SC4tHIAsOCKMJNo77mNze2YiDv1aFhi OMyfPVvLM+0vlckHYz5Oi8H/uxVCwSsdiOm/XVTan+C7173xSmc95iEk3XdOz0xM2kaG EzR0VYVI2BPjCusjbj1hfwKT0/AMNfnP8/j/pjH0oiHZNAA1g3oyvomzZMM0VVbDAtec IuZIVpa08PcFZMDG3RWHCx0FR8kjUozlaiXjulUt7yNpLubzMu0aKNq6YFptiiYmTBxj sluot/NtlaexBLVgRW6QPp90L43SsJ6ZKZNw2FIkbbuDCMu6NNKrI2pB07bpZx2PyJg+ f39w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nYFN9YS9lGoY3Drq+6yfHeUu5PUEzCkva/9j6XN0ZE4=; fh=rOC7q8UJisRayejF6PsoKdRfRTtXVZOwgDCXOG0B/ws=; b=c5nIh01sUuAWx5P0Yoqh2MLzXX/fM0bgYdNyweBFsstGUbqFixXY6RD1mso5sywBD1 Ud9KuV8wlgRpAB75VsXFoErq2Zqmw3G6ncHDKAU0kwToP8S+GCWRbcr+oIaopGpe8YyD QTeYHH/b/uXSvIyrvVrYJCQNvNr2gwu4OipjiIoYhEVgJuJLDBPuEAd0F8h9OtUFG4aR RkOyNGfdtxTagNCO5CIYkYpGjiMrDCoko+35IGzo8EsUOPBEyCpgg0B9AI1w+9m8cYeh /ePgROkLmaieopEBJsNmIb63qGVNkhqFflJOfvC+KB6XmsDfpLJ2DUAJj9YNMUvmJV4L 1d+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=2efiOwzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q27-20020a63751b000000b005775c7e504csi2823137pgc.145.2023.09.21.19.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 19:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=2efiOwzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 765EF8104F5B; Thu, 21 Sep 2023 10:24:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229630AbjIURYO (ORCPT + 29 others); Thu, 21 Sep 2023 13:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjIURXw (ORCPT ); Thu, 21 Sep 2023 13:23:52 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5C3642C3A for ; Thu, 21 Sep 2023 10:13:33 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-400a087b0bfso12646275e9.2 for ; Thu, 21 Sep 2023 10:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695316409; x=1695921209; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nYFN9YS9lGoY3Drq+6yfHeUu5PUEzCkva/9j6XN0ZE4=; b=2efiOwzUDnc3Jd61Owi4Ga0h1S17k2rrXV2JoGVfTkXAtgxfVhKhYWLM/OXdtsqXCU luiAXiWMjKr7uv5z0QduzOvqBawRLsuX8h7BjV0D+QLYbUFwsPwcZlEDmKPcQyluzhff JsTV6TxWIvdlf7HAzQAIhUvLsIKBJoqA7AnXMtflGBMooCfkcPYxZx+T0+f49wS51JIU uJTLBAxaVUWmqHAXcgkqL4+C7k+rjy7Z/1FuRlPaYbOLPuVqyLbZ8aZwGgzrUZdEjodg TpQ6VnbE4D2t4SpnE6JzNBlS5iHoH5RHt3rS7TsIISA4kWZcPecGIy3kb9F3GfIvJ1S0 jjKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695316409; x=1695921209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nYFN9YS9lGoY3Drq+6yfHeUu5PUEzCkva/9j6XN0ZE4=; b=MsaR840LW0G/ZKX5crRRzroQ8IAMbQBG2DUI7UFqFa8poeq+zZO8/P+RcYZGw9NL5/ FDzEQSJdU0xgA50U/1TouKQspWQoeTu+kXu2OMCb21wqcF4Ze1/nET6mpV+bV9x6ZQrF MmiQfFXa/SAj0mSsrwX4i7PAxOtirYyQQTFg/GHlLpAoDnmBpc8P4+ovyclK451Fa/4O c4uMbuyoIW813WxlzutUoAxGczzkygo8fflowsOpvW8rwnuqYfES71bsKM1nsIH1is2h qsLpvcxcjvkewJ6ISoC9Do6/roeCV0rscfZVRJ94HSQCuy3rJpnXRnom+87qh/QYb7q2 1nTw== X-Gm-Message-State: AOJu0YxysCAaztIyLe1xdIjL7P1ANBNIIZugS/rT0IMQPfkxGsUmJy0c UD7yA4Dds2MlBFoLHxwEvBKm1tjcWbSG1ivQxONOU9jI X-Received: by 2002:a1c:ed08:0:b0:405:1bbd:aa9c with SMTP id l8-20020a1ced08000000b004051bbdaa9cmr5515593wmh.34.1695306166581; Thu, 21 Sep 2023 07:22:46 -0700 (PDT) Received: from localhost.localdomain (abordeaux-655-1-129-86.w90-5.abo.wanadoo.fr. [90.5.10.86]) by smtp.gmail.com with ESMTPSA id n11-20020a5d4c4b000000b0031fbbe347ebsm1901426wrt.22.2023.09.21.07.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 07:22:46 -0700 (PDT) From: David Lechner To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev Cc: linux-kernel@vger.kernel.org, Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Axel Haslam , Philip Molloy , David Lechner Subject: [v2 16/19] staging: iio: resolver: ad2s1210: rename fexcit attribute Date: Thu, 21 Sep 2023 09:19:44 -0500 Message-Id: <20230921141947.57784-19-dlechner@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230921141947.57784-1-dlechner@baylibre.com> References: <20230921141947.57784-1-dlechner@baylibre.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 21 Sep 2023 10:24:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777701717986048681 X-GMAIL-MSGID: 1777701717986048681 This renames the fexcit attribute to excitation_frequency to be more human-readable. Since we are already making many breaking changes to the staging driver, this is a good time to do this. Also make use of IIO_DEVICE_ATTR_RW while we are touching this. Signed-off-by: David Lechner --- drivers/staging/iio/resolver/ad2s1210.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 27294eff99ef..14bec2b20939 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -217,9 +217,9 @@ static int ad2s1210_set_resolution_gpios(struct ad2s1210_state *st, bitmap); } -static ssize_t ad2s1210_show_fexcit(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t excitation_frequency_show(struct device *dev, + struct device_attribute *attr, + char *buf) { struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); unsigned int value; @@ -240,9 +240,9 @@ static ssize_t ad2s1210_show_fexcit(struct device *dev, return ret; } -static ssize_t ad2s1210_store_fexcit(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t len) +static ssize_t excitation_frequency_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t len) { struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); u16 fexcit; @@ -555,8 +555,7 @@ static int ad2s1210_write_raw(struct iio_dev *indio_dev, return ret; } -static IIO_DEVICE_ATTR(fexcit, 0644, - ad2s1210_show_fexcit, ad2s1210_store_fexcit, 0); +static IIO_DEVICE_ATTR_RW(excitation_frequency, 0); static IIO_DEVICE_ATTR(bits, 0644, ad2s1210_show_resolution, ad2s1210_store_resolution, 0); static IIO_DEVICE_ATTR(fault, 0644, @@ -604,7 +603,7 @@ static const struct iio_chan_spec ad2s1210_channels[] = { }; static struct attribute *ad2s1210_attributes[] = { - &iio_dev_attr_fexcit.dev_attr.attr, + &iio_dev_attr_excitation_frequency.dev_attr.attr, &iio_dev_attr_bits.dev_attr.attr, &iio_dev_attr_fault.dev_attr.attr, &iio_dev_attr_los_thrd.dev_attr.attr,