Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796407876; b=42BE6SQvrMcjiPyXbqJ98GGBCCT/34IsIH1xl1NKw0BGYAdeNdqcT2sz1Y++DNsvGaX2 4qSTbYSAyg0BHSUTlA0rQoQL5GsNIn6j8/+9pH9dsuCv/1vvblfsnWeJH3zyuqoLMshDi IdNoHbQfEldtG97tfGxv0s557HAJ4p4QLecAVty2o9CtKwKanzon5xfv1CKAc5ivP4tj1 tLQOyit7LlNV0TLgfyDPOzUQCBaA1l+ln0lSksEt4ygAw7+bdoO9XEizSOqgjqHwOKu35 6DTRkxHuiZj8ZYODr4+RGNvwpq8tn1UNLTIukENO2HJ+L8XdMQyQUVYdqkoKHi+kCwA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796407876; 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=VxfaFlc+olpc2MQbUqnxLvUktURVY7bhlAiChGcuD1wBqGsxTODSQwmmPfqJY4EybsXH LH607HjG9o76xRVFfrYwb/dceDB+oyfsbYMd26GkDS9n3RZbW+BQUqv8olysvAJUJK5fp uqFMTCZ+FH5fLO+Tz0APj3QG8TJwqJAgja4Kq/KkfioQr05yjbjme6RcFcxBy2b9BJ2SM TUg5Sp63REXZ9V95HWTfvdk9klnnyvZAIXlo3e6qgEM6z+nxjg1zFlWDOy15I97w0sl68 nEf44QKt8+WjUsD71ryjlhNUpynLSHOzazT+pcaRmhrc+dnJhLLX3ea1vNIhD6yo/eA== 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=RIJdatwN; arc=none smtp.remote-ip=209.85.167.47 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 27AB1606A338 for ; Fri, 4 Dec 2026 18:11:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 27AB1606A338 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=RIJdatwN Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5c365b3a5f2so743531e87.0 for ; Fri, 04 Dec 2026 10:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796407874; x=1797012674; 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=RIJdatwNm7KUz2BNMA/DhGXy3x3cTYSGBoPLh08hKJTFMGPi9h5KeKKGEzRnruUKYx JOKnhFTxQjiFQYtT1OZC+Ry00lJfPS7ajvp+6cABWaWQG9X7hiuyBO7coNQ7Yplv+bMC yWKslsAF0EJ44ewIIUO4/Y8Un+hPqUAOYZyLgl7UXX16MByg3sDylUfLe5gmDsZl/BVz qsaJxM6sXD8FPFXRhfpbJl0AtTpS8nKHPOZCnoSjdXMB98144sar8v0TGiP3zViU+eP0 kMRHzXa0aqk/J7EkIpX7DHnh8UaLV4/OuzAcnHZefrN+Echyn2yCLf1HsVmuHKmqChy4 kJmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796407874; x=1797012674; 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=AJ25TH/7Jyruo8H4BRuFmYJ3fXWwYRrtpXVA0sLdwKzlIGEkbhFJmD9yVrBSFJoZ/m dwuBFwi8TF+o6lfk7ZNIDlgs9H0lRcgqVlW+5rQN7pV3Ju5LKILTOZM7rXWpaY+wbJHt NGWuJAbM/+faI88BS+6EdGbFYW7D+tcbBTdP8grx1A3lc+XYNZH0ZDoIZetvfGNoCRkh zecL3myladSxYuJxJ2ELKtSOypinjnXimBMOyYQxag9B7x+NG5FPF2lTaTAhtHmG+zSs yzN7Pfgmq+I96gKSdsjKL0nWs/QQBnCdBGuemc8rOZQBVSUu0yl8tfDZ7ESnFIeM9RGM 1SEw== X-Forwarded-Encrypted: i=1; AL+hErHG7Pm5maG8/r/V6cRSAjxcqZne+rBPCA0svzRhNR2U5NmrqNwof+i5ptaYhTQl+ayZf3Tgc+/SK8w=@vger.kernel.org X-Gm-Message-State: APuU4Z9m3FCSl4yrh+YTYxiOnYUzHznvyPlBDxFHP+fmxAubzpARfGr8 /RivQ03qSRlySkkpRuk/O5iRMOXgK/Y3wQmRYiMrTAJdGuZ6C3klcxDb X-Gm-Gg: AZFdTZd0Tixh73G4rmn0Bocw555m0vVJYY0vMFSHkzymReBs49lEf98IvYLoYAiNZfx 2xpdjhHhR11NjuJJpO6yD+ti44eCMKT0dBH+lsV/Y7GYdmRX1v2fyfSBp6JVYn8qukjPBrf3KGl kgLwS72YPKQ3iPB4woDlxn+XvVtTVAw8hTJhJGKHyFGaEnwrJPQDODDsmqxPWdA0nLymbSKx4z6 kzowC6cDNSY+cSKkJV4Z7xhWOPPlDWZCs6Dmnr3r3LOM4jOJlaC5EG+Ijv6hMaW9ijGPZKY2zua qCre8IzJwChJXSvAbDRiwQvtU69KppUUbGxeKLSLVbi24XuA0PU4yajAvdbdAnTuHLzlHsdrv6G zq7F/8JCRW3FNQAqWXeqY7kfKj97DXRAFjZW/sZ8vdTIEhiwCekpoiaLQQfEhoXrXr0Fc/eteyx ZE4YjfHlARD2vaGymjcTcLTlplPibCxfbQ+du42wchutdnVwRjEax+qU9rBbKiIhsUXoAY4F9iz vgs7Gi6u2oIi17Yo+jaFGicBng4/cweQPZlj8FKapnkR6KPJPHSmUt5X8eF+8ilFkCREU/aUNyc 0FfWZxJYMwOM3v42JMsclEtUAflBxPK1kooqH27cVOk+kIOhSiGtcjxFkLn1nFfoMD/dLdjSRiJ lwUqouKFdxIOnqejvhw== X-Received: by 2002:a05:6512:b9a:b0:5c3:3776:a345 with SMTP id 2adb3069b0e04-5c3861cd7eamr764720e87.61.1796407874263; Fri, 04 Dec 2026 10:11:14 -0800 (PST) Received: from yantra.. (91-159-24-23.elisa-laajakaista.fi. [91.159.24.23]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c384aa37a3sm790311e87.67.2026.12.04.10.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 10:11:13 -0800 (PST) From: Rupesh Majhi To: Andy Shevchenko , Antoniu Miclaus , David Lechner , Eddie James , Jonathan Cameron , Lucas Stankus , Marcelo Schmitt , Michael Hennerich , =?UTF-8?q?Nuno=20S=C3=A1?= , Petre Rodan Cc: linux@analog.com, linux-iio@vger.kernel.org, Rupesh Majhi , Andy Shevchenko Subject: [PATCH v3 5/6] iio: adc: ina2xx-adc: use iio_access_debugfs_regmap_reg() Date: Fri, 4 Dec 2026 20:11:04 +0200 Message-ID: <20261204181105.150419-6-zoone.rupert@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261204181105.150419-1-zoone.rupert@gmail.com> References: <20261204181105.150419-1-zoone.rupert@gmail.com> X-Mailing-List: linux-iio@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