From patchwork Mon Aug 22 12:51:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Regus X-Patchwork-Id: 599357 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAA65C3F6B0 for ; Mon, 22 Aug 2022 12:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235195AbiHVMwo (ORCPT ); Mon, 22 Aug 2022 08:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234269AbiHVMwn (ORCPT ); Mon, 22 Aug 2022 08:52:43 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40DD22E9C8; Mon, 22 Aug 2022 05:52:42 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27MACgV6005778; Mon, 22 Aug 2022 08:52:36 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3j2whtner0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 08:52:36 -0400 Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 27MCqY4a048892 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Aug 2022 08:52:34 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Mon, 22 Aug 2022 08:52:33 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Mon, 22 Aug 2022 08:52:33 -0400 Received: from debian.ad.analog.com ([10.48.65.119]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 27MCqBGV003358; Mon, 22 Aug 2022 08:52:28 -0400 From: Ciprian Regus To: , , , , , CC: , Ciprian Regus Subject: [PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499 Date: Mon, 22 Aug 2022 15:51:04 +0300 Message-ID: <20220822125106.1106798-2-ciprian.regus@analog.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220822125106.1106798-1-ciprian.regus@analog.com> References: <20220822125106.1106798-1-ciprian.regus@analog.com> MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: hMV1JjFzSUa70sqVooS74vQt-thjMiPN X-Proofpoint-GUID: hMV1JjFzSUa70sqVooS74vQt-thjMiPN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_08,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 spamscore=0 adultscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220054 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update the bindings documentation for ltc2497 to include the ltc2499. Signed-off-by: Ciprian Regus --- Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 6 +++++- MAINTAINERS | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml index c1772b568cd1..7bb30eafc543 100644 --- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml @@ -13,10 +13,14 @@ description: | 16bit ADC supporting up to 16 single ended or 8 differential inputs. I2C interface. + https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf + properties: compatible: - const: + enum: lltc,ltc2497 + lltc,ltc2499 reg: true vref-supply: true diff --git a/MAINTAINERS b/MAINTAINERS index 9d7f64dc0efe..3c847619ceb1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1327,6 +1327,7 @@ W: https://ez.analog.com/linux-software-drivers F: Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523 F: Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350 F: Documentation/devicetree/bindings/iio/*/adi,* +F: Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml F: Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml F: drivers/iio/*/ad* F: drivers/iio/adc/ltc249* From patchwork Mon Aug 22 12:51:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Regus X-Patchwork-Id: 599356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 338FEC3F6B0 for ; Mon, 22 Aug 2022 12:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235210AbiHVMwx (ORCPT ); Mon, 22 Aug 2022 08:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235198AbiHVMwt (ORCPT ); Mon, 22 Aug 2022 08:52:49 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 751712E9D2; Mon, 22 Aug 2022 05:52:48 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27MCdnLA005837; Mon, 22 Aug 2022 08:52:43 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3j2whtnes7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 08:52:43 -0400 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 27MCqgcC035270 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Aug 2022 08:52:42 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Mon, 22 Aug 2022 08:52:41 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Mon, 22 Aug 2022 08:52:41 -0400 Received: from debian.ad.analog.com ([10.48.65.119]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 27MCqBGX003358; Mon, 22 Aug 2022 08:52:33 -0400 From: Ciprian Regus To: , , , , , CC: , Ciprian Regus Subject: [PATCH 3/3] drivers: iio: adc: Rename the LTC249x iio device Date: Mon, 22 Aug 2022 15:51:06 +0300 Message-ID: <20220822125106.1106798-4-ciprian.regus@analog.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220822125106.1106798-1-ciprian.regus@analog.com> References: <20220822125106.1106798-1-ciprian.regus@analog.com> MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: TvxT1NsSQom5BmruSZAAlvJjMkMTW2J9 X-Proofpoint-GUID: TvxT1NsSQom5BmruSZAAlvJjMkMTW2J9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_08,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 spamscore=0 adultscore=0 mlxlogscore=947 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220054 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Set the iio device's name based on the chip used. Signed-off-by: Ciprian Regus --- drivers/iio/adc/ltc2496.c | 1 + drivers/iio/adc/ltc2497-core.c | 2 +- drivers/iio/adc/ltc2497.c | 2 ++ drivers/iio/adc/ltc2497.h | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ltc2496.c b/drivers/iio/adc/ltc2496.c index 98338104c24a..86470f49e8ca 100644 --- a/drivers/iio/adc/ltc2496.c +++ b/drivers/iio/adc/ltc2496.c @@ -89,6 +89,7 @@ static void ltc2496_remove(struct spi_device *spi) static struct chip_info ltc2496_info = { .resolution = 16, + .name = "ltc2496" }; static const struct of_device_id ltc2496_of_match[] = { diff --git a/drivers/iio/adc/ltc2497-core.c b/drivers/iio/adc/ltc2497-core.c index b2752399402c..6dd9ab601904 100644 --- a/drivers/iio/adc/ltc2497-core.c +++ b/drivers/iio/adc/ltc2497-core.c @@ -169,7 +169,7 @@ int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev) struct ltc2497core_driverdata *ddata = iio_priv(indio_dev); int ret; - indio_dev->name = dev_name(dev); + indio_dev->name = ddata->chip_info->name; indio_dev->info = <c2497core_info; indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = ltc2497core_channel; diff --git a/drivers/iio/adc/ltc2497.c b/drivers/iio/adc/ltc2497.c index bb5e0d4301e2..a0aad71c8130 100644 --- a/drivers/iio/adc/ltc2497.c +++ b/drivers/iio/adc/ltc2497.c @@ -99,9 +99,11 @@ static int ltc2497_remove(struct i2c_client *client) static struct chip_info ltc2497_info[] = { [TYPE_LTC2497] = { .resolution = 16, + .name = "ltc2497" }, [TYPE_LTC2499] = { .resolution = 24, + .name = "ltc2499" } }; diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h index f4d939cfd48b..0e86e38248ee 100644 --- a/drivers/iio/adc/ltc2497.h +++ b/drivers/iio/adc/ltc2497.h @@ -12,6 +12,7 @@ enum chip_type { struct chip_info { u32 resolution; + char *name; }; struct ltc2497core_driverdata {