From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796551424; b=JAaESDd2Kz5u6gNc6TG327fdIBPvifu6Ywd8AUDxEcJCz/ithSn5HCc0RKoZYIWJs4u2 i9Y8hAF2FpmTmelcSPblp9vtBbIuZ0/taGv3YzNgNaLntazj97UJXzHKCsZfUP6k863+Z PavoMty5fIx6nrZkJ1auTy6yx/OEzxAN1L3uNmJeql/UDZbrO+3G/Kzv8zPBCAqOQd7Aa Dt2E/+IA1tYjBo80humlZXdfD63DE19OfCrhgu2ateqiz0wb8QKvHzhstL34p2rYQG3o+ rWacU4f8Bl0vU0ZpaZFFfvJe7DMPPK9b0z4weqvH+A/CLRXx/eN9HDveaCxp/KVzY1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796551424; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=k7Kyrmw0AgyiRaq1FzqQ4JPpdmfgpvc1hClpoWEMDZI=; b=I1jvF/Iuss8t08VaCPMYDvArHwSt2yiOn/JmqupbZr4K91iopwdlMTslxtYkzXrRjE4G jaFONdlNbyKym+Q887pa4zt5zkut6sxi6gSQUBw0FC8pCwOe6uuyVGvqVGW1bkwfEatRY fBl6vLaIljvi+T0+6yGGd82022pOWKMxDGhL4RzGlW0NAfcdpzXrWeh7O4dh7rBgpCNNC X3LXtyrGULXsRz/3BDRHg75zXDKP7g8W3LrVKqfcA/ML7qww6moVe7OtS0R2GOyuajhJs 7e0Dp3aV7qSoFPOSbJutkIxD9B3hWs5OJ3MIw7dy2fqzMlq5YEy9AxL7OJ1QkrrTuVA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yGINdija; arc=none smtp.remote-ip=209.85.208.182 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91C43606A321 for ; Sun, 6 Dec 2026 10:03:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 91C43606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yGINdija Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-3b0081e51c5so16288371fa.0 for ; Sun, 06 Dec 2026 02:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796551423; x=1797156223; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=k7Kyrmw0AgyiRaq1FzqQ4JPpdmfgpvc1hClpoWEMDZI=; b=yGINdijals4F5/1fsplb/r5Kt7xp8xL2dgCOUTRJcNbT8VBrMGaMiKJDgfSaNkH6aP ShgZM5lI2/HDY/JZDCSdWhHJQv7ijbtxvy+0gIAAh883N74jqtXp66BxeLFwwfLAKUEq 6iO7ehzR5hs4smKFGOVttAs5FU9ZMqoKe45W/+nbJSsvqatQq9oRpdBTRLp26QZk5Wy9 97fKDsUxjdvuYmhuvXNIPNfezMvkNMTlT83q5uMfP5jUgIWkq5Lys0u7Yq7ap+B7TTy3 Ozz1xlKydTydlK89wwwamIi0HIpqzL83MEbJHqpPXyjy60cglBL7LOi9gjICDpR1bZ4t byEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796551423; x=1797156223; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=k7Kyrmw0AgyiRaq1FzqQ4JPpdmfgpvc1hClpoWEMDZI=; b=fZLNnxT0WGbuVpTEb0GezlCUWfuQSNHk7XZ6HOK3TYozydJlpqMcTEjNaoy0lh9wjt pDkoR4cdmlznOAsJ/lmU10ZTORzKUR4K0CtfkM6/H4yR02Jqt5q0nzuRWiaySwBLTVV4 6iIL0dez7f5rN+xInv9AY6s/f9sd43a0IrF8mBwBRFYUpawTKjhhWcHeC+kSV5xNdt3L E10/58WNeBuOofxOyUc/pBRzGFSzpkjL8gwLxhhOf5zBmVogJkh9B/Y/c5iKydJelTfY CyLXwHsJbpj+JzMYsSyYVQOmg39NcJs54gJThkBZwQ7Adje8ZqJwcb8+E4gNFoCcTMJW jTew== X-Forwarded-Encrypted: i=1; AL+hErEsFEXUGjKupvFlWcttRAE9rBciMEsdUZFy54amCasEvW+3IljgOO16NRmzBGq+WdCuuuhL4i93aHY=@vger.kernel.org X-Gm-Message-State: AB4q+uFogdkoUQRv+Ni33QO5TRQV8Nq7mhBFLvAGYdbHqCFkd3NGIjuB 7vDRKBC7yX5dpoxgP3R5o1AkH7AB2OxcXntckJaUvqx9AD4L82Q/mRRA X-Gm-Gg: AZFdTZc/2/HIJaFIhrKFAx8NEJlhFTV8mBgp98Pbug1dUfDLEgewcCci6Gvq4ErfN1o SFmOYDoqqIqx0yFDu5RLB+AUnHkkX8bf7yvJqgJTxnpm7PGyW68/dCfGoeHEkuNM+KeTO4QSvT7 cljiUzILj3WV296LcqoJseuYhpqH7Ry3T2LSjMwmtCBqGaprkTLeNXk0DkkJEvtN324Mwup0rr0 mSbGMrqcg9Gx1BlsBAfFvi/f+Jx6DnpXZj4iKoLEUPt+3b1auN5dZaDBZwfru+qOZvITH//2WBJ E7XIFy4gYgGYsAszIbsRpVLBm19/ra3ZVvIpftbfeEUPrlgK1kO2VI9UJ9BdzB627upqVk9Rp74 sz15w0DeY6nPLsJBAJyTTlrBwpQz0tq1+P66VXQAkZqcMGGRRMNB0ia/tn3v+8mknBXxMvqDhCT CMIRR+3Pj30AdE9lP2qABEY0wahRWkGIJ0GjyVsNs4IS5FWQXPl4jQ23kSCFe9Jhy/5rn4oUtTP K3EwMoIvItXUuvE5eufw0Yq+5Sc8Z90dUIZShGGogu//qjerhfjkvsphy89mGO/JnRyeO33MCnV NyhrmmMS2apQBzj5Kw4fZURz1xk1a0vJClSydtvG1mnFAmokPilWMZNd9u2AHVywFTWEFnmcmc/ OsLN5tJKpZe1Xx/qsgw== X-Received: by 2002:a05:6512:2208:b0:5c0:da4:7806 with SMTP id 2adb3069b0e04-5c38619d8b9mr1873400e87.11.1796551422653; Sun, 06 Dec 2026 02:03:42 -0800 (PST) Received: from yantra.. (91-159-24-23.elisa-laajakaista.fi. [91.159.24.23]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c3849a69fbsm2223243e87.10.2026.12.06.02.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 02:03:41 -0800 (PST) From: Rupesh Majhi To: Andy Shevchenko , Antoniu Miclaus , David Lechner , Eddie James , Jonathan Cameron , Jonathan Corbet , Lucas Stankus , Marcelo Schmitt , Michael Hennerich , =?UTF-8?q?Nuno=20S=C3=A1?= , Petre Rodan , Randy Dunlap , Shuah Khan Cc: linux@analog.com, linux-doc@vger.kernel.org, linux-iio@vger.kernel.org, Rupesh Majhi , Andy Shevchenko Subject: [PATCH v4 6/7] iio: adc: ina2xx-adc: use iio_access_debugfs_regmap_reg() Date: Sun, 6 Dec 2026 12:03:25 +0200 Message-ID: <20261206100326.45569-7-zoone.rupert@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261206100326.45569-1-zoone.rupert@gmail.com> References: <20261206100326.45569-1-zoone.rupert@gmail.com> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The debugfs callback only reads or writes the regmap of the parent device, which is what the core helper does. Reviewed-by: Nuno Sá Reviewed-by: Andy Shevchenko Signed-off-by: Rupesh Majhi --- drivers/iio/adc/ina2xx-adc.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index c412f5ed46a1..abaa85da9acc 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -895,17 +895,6 @@ static const struct iio_buffer_setup_ops ina2xx_setup_ops = { .predisable = &ina2xx_buffer_disable, }; -static int ina2xx_debug_reg(struct iio_dev *indio_dev, - unsigned reg, unsigned writeval, unsigned *readval) -{ - struct ina2xx_chip_info *chip = iio_priv(indio_dev); - - if (!readval) - return regmap_write(chip->regmap, reg, writeval); - - return regmap_read(chip->regmap, reg, readval); -} - /* Possible integration times for vshunt and vbus */ static IIO_CONST_ATTR_NAMED(ina219_integration_time_available, integration_time_available, @@ -950,14 +939,14 @@ static const struct iio_info ina219_info = { .read_raw = ina2xx_read_raw, .read_avail = ina2xx_read_avail, .write_raw = ina2xx_write_raw, - .debugfs_reg_access = ina2xx_debug_reg, + .debugfs_reg_access = iio_access_debugfs_regmap_reg, }; static const struct iio_info ina226_info = { .attrs = &ina226_attribute_group, .read_raw = ina2xx_read_raw, .write_raw = ina2xx_write_raw, - .debugfs_reg_access = ina2xx_debug_reg, + .debugfs_reg_access = iio_access_debugfs_regmap_reg, }; /* Initialize the configuration and calibration registers. */ -- 2.43.0