From nobody Sat Oct 4 09:41:03 2025 Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 916AB31E103; Mon, 18 Aug 2025 13:13:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522823; cv=none; b=IW/TLK4KZESDvDo12Cpi+sw8BrDvOhq199W4d8nnmj6d1qTC8Aqf3YmnbJaB7jd4Ns5dElBxeviVMtN25DX3iGs308fxIVakgmIijYtzNa8+o8x7jd+o7lhqTY6XipNnTuv/LaHmhS11ro8fMN92fIxRNxHMDbBlQZBzpu0Mywg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522823; c=relaxed/simple; bh=o1BseyaOeay3bQTmRz21iCAEL1o96ZnplZvKWnfBxSE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WLg0A1dumthTjzG8UMwtHDnw6zt8I4Zq67hklryHrBVBfAVAVWnFL7gEPn7tDPlglilF4P4YolIxZHIJz5mUdzBfGDSNg3lQlm+GPJq/ZkeYi+6DMnFIdCW12jVaJKmmvpd6/sQfMoE5FS60ibbAoOTqaT1kgcqyVaPqg6SPhd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=uN4HcgJ4; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="uN4HcgJ4" Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57IBn7hH023182; Mon, 18 Aug 2025 09:13:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=DKIM; bh=YeJzR 5CoQPHfPZ5eNZEZhg5dyIg+pGrGT16IUOIEFhA=; b=uN4HcgJ4AgrawMH4utrBI OxTSDRmrfcmxKJSxpKZ7cPzDZh2NNEzEh2HGE3SdxzolQlSwsS0F+Rg9cGL8iHgy vYo5qJmi+0xSrABOoVujvNQNC5U6ghyta7iQ56SJnxl7934zg0p6qJwG13mztfa4 w5CKCMvjnYOAYMfDDbvVq50RU9wy3MvGy8jO4OtVG/hx6xVyzHpnw6WuCDNFxl8t d62ve9FwMIhAiWT3BXgaRlt5rF9wkZK9Pv+BOvZqplCCJD3lt17+jcl0nDJgtXZc YharH/VwWcgeG63iwsvYYlgqHQzFjMn16a8lI0JeAP9E40VFwMPsoa2AhmO3REvG A== Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 48k8afe7jy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Aug 2025 09:13:27 -0400 (EDT) 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 57IDDQ4p044080 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Aug 2025 09:13:26 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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.1748.10; Mon, 18 Aug 2025 09:13:25 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 18 Aug 2025 09:13:25 -0400 Received: from IRISTEIU-L01.ad.analog.com (IRISTEIU-L01.ad.analog.com [10.48.65.173]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 57IDD8Om008451; Mon, 18 Aug 2025 09:13:21 -0400 From: Ioana Risteiu To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ramona Nechita , , , CC: Ioana Risteiu Subject: [PATCH v3 1/4] iio: adc: adi-axi-adc: add axi_adc_num_lanes_set Date: Mon, 18 Aug 2025 16:12:47 +0300 Message-ID: <20250818131253.8854-2-Ioana.Risteiu@analog.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250818131253.8854-1-Ioana.Risteiu@analog.com> References: <20250818131253.8854-1-Ioana.Risteiu@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE3MDA0NiBTYWx0ZWRfX1ssp/r2U0ukk vK+nKjHRvhdbKvzEn5N2EqX1ORYltYbZaMIk2DS/t0b0lFETFoEe5+tyMDl7CZkBnMuDJqFQ+FJ ruBKRa0odSb6vwSmujFc3LYtXy2NXKn37wF1wQm4CAGZdHhixBGD6smKLtvvKVX7Z4ZyF6YEmOE IBedoIb74N85Rq5aGwwTw0S0Z/w1Hj6t0gLPmr4rSNskoLfOwy7VeZGiBfPLJ+9QZbtEZ7+Utq9 t8aWTV9YXEccmp58sVnhWtStj24h1CzBnUAO54bzf2JigTOUvmxcfAe3rGyFVsCxU8E2I9p+yWy yBRX7deVVHCH4ItUdMTWT/yo9HsbCZ4sFy5BmGh0vkhI0J4H6/NXlxZP9swOJSo6jL4oNU+/M8N jydlzsyp X-Authority-Analysis: v=2.4 cv=WvwrMcfv c=1 sm=1 tr=0 ts=68a326f7 cx=c_pps a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17 a=2OwXVqhp2XgA:10 a=gAnH3GRIAAAA:8 a=WSTu20uV4lPDdy4zL6MA:9 X-Proofpoint-GUID: WEy1nq_wD2f0xcyoo-5VF1fi0RjdmMNw X-Proofpoint-ORIG-GUID: WEy1nq_wD2f0xcyoo-5VF1fi0RjdmMNw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508170046 Content-Type: text/plain; charset="utf-8" Add axi_adc_num_lanes_set in the adi_axi_adc_ops structure to support setting number of lanes used by AXI ADC. Signed-off-by: Ioana Risteiu --- drivers/iio/adc/adi-axi-adc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c index 2d86bb0e08a7..20bb59c24acf 100644 --- a/drivers/iio/adc/adi-axi-adc.c +++ b/drivers/iio/adc/adi-axi-adc.c @@ -617,6 +617,7 @@ static const struct iio_backend_ops adi_axi_adc_ops =3D= { .chan_status =3D axi_adc_chan_status, .interface_type_get =3D axi_adc_interface_type_get, .oversampling_ratio_set =3D axi_adc_oversampling_ratio_set, + .num_lanes_set =3D axi_adc_num_lanes_set, .debugfs_reg_access =3D iio_backend_debugfs_ptr(axi_adc_reg_access), .debugfs_print_chan_status =3D iio_backend_debugfs_ptr(axi_adc_debugfs_pr= int_chan_status), }; --=20 2.47.2 From nobody Sat Oct 4 09:41:03 2025 Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 639283218C0; Mon, 18 Aug 2025 13:14:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522870; cv=none; b=Gs9QKXECD7vNfRgUvQaTEMq/6hgbnmSEWEP6YxasQDY/1ddw6J6VmHHmJnB3xPqwP6aQnFqMozNmZCGxdR7wCrT9P08BRQcyLe7GPQOyQzhJFUDDXB+YV6qDjjdqlNcPj8jAouzv+vN3omOYcYWlPd7pusOspDdomPaRT+vLqvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522870; c=relaxed/simple; bh=LTwc1h9JWgl6ubkagxeJA12/t3fyvSEJvLPL9f7veKQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KdmBRDenPM2Ea//ktsQA6XxpeNrzcIf+vAciijuBHfdtCLLuRtrAQtnLZUSO9Hlp8Y5XFU/X9ucFI0JsD1I8DeQq0QuJ9qi3cetzJ/jkdS+OmQfh63jphs38ZDzEfkFIca+Ax4oR51DPYxUX+kKSe45Y9IDnvSagczkc7nloq0o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=RRS3Pjas; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="RRS3Pjas" Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57IBhxiT023167; Mon, 18 Aug 2025 09:14:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=DKIM; bh=fQG3E pgwqRzwv8VRL2l5bktVIs3G6KJtsmLNx+BNKmI=; b=RRS3Pjas/+F87lZtzeo6N BbPm4TL0G4GQa/Ng5Yx0VRHobLTwl+wJoWbiaAI/ZxUVOLThPn12jrvAj53GBn3E P9ZJKbbthjZnbbUpU6D/E9C6FfKFTpe4kNFHTnjgWCgOUoZYLyDeqwQkgdNMB5pR PLfz1BUkfh/4aKI/6TMD6Gl8H0VP5cdsv2XWaB6ndl0lgJTN/gGEWKFNRv8GIq71 dWre0bC8vRtQ1ZMC8+akHtAN6xciNXdtE/oigkvZ1WteFHtxN71PTXaOen+lec09 wHITKouI75WCcEydL+G3df5NQ5jbnOjPeWVl9r2FIckNkOg+/drxBn0TJ2biUmYY Q== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 48k8afe7rw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Aug 2025 09:14:14 -0400 (EDT) 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 57IDEDAQ011976 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Aug 2025 09:14:13 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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.1748.10; Mon, 18 Aug 2025 09:14:13 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 18 Aug 2025 09:14:13 -0400 Received: from IRISTEIU-L01.ad.analog.com (IRISTEIU-L01.ad.analog.com [10.48.65.173]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 57IDD8On008451; Mon, 18 Aug 2025 09:14:04 -0400 From: Ioana Risteiu To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ramona Nechita , , , CC: Ioana Risteiu Subject: [PATCH v3 2/4] dt-bindings: iio: adc: add IIO backend support Date: Mon, 18 Aug 2025 16:12:48 +0300 Message-ID: <20250818131253.8854-3-Ioana.Risteiu@analog.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250818131253.8854-1-Ioana.Risteiu@analog.com> References: <20250818131253.8854-1-Ioana.Risteiu@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE3MDA0NiBTYWx0ZWRfX2oODDd2fmxEg mkxoREOI2Cev3GEZ7QMAexO2vp/Zm3RCGrWsDhHpZArPxW5FkGOPCm/GK6R7qsBLw07GtbWk4Yd 8dHN3mkM4G9uplXYaW+Kg6bJ808KT07d01yKJJ94xpm6TcVvZVX+Urap/RIeJToCk8F8743I6Aw zclmyn27/TIr3Exzl9/maVnBDmZ/FcpXJ4O70c6GnmWsJWcL6tj7CIs3PSCB/yrjTvh+NELGVyO WBiLtFdH/Xfx6SQvCuapjOjzxLYHW8NfXyzrxaNTZJwG76zVmz5HGi03V56YkIu5VPihfpmK/tH MlWAA7f0TyXFNn/TddDELA3rUOkjD8uqw4CuEb0YAG2t7RbPuuokFjCIOmem5J9+u4MgxPYetfC Qcmsnxnk X-Authority-Analysis: v=2.4 cv=WvwrMcfv c=1 sm=1 tr=0 ts=68a32726 cx=c_pps a=PpDZqlmH/M8setHirZLBMw==:117 a=PpDZqlmH/M8setHirZLBMw==:17 a=2OwXVqhp2XgA:10 a=gAnH3GRIAAAA:8 a=vK1i7N8imb33MzeTDgYA:9 X-Proofpoint-GUID: cPqHw2mLIY_TK9EVRq9Mc25pAL3hUYCj X-Proofpoint-ORIG-GUID: cPqHw2mLIY_TK9EVRq9Mc25pAL3hUYCj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508170046 Content-Type: text/plain; charset="utf-8" Add the generic io-backends property to the AD7779 binding to enable support for the IIO backend framework. Also add the adi,num-lanes property to set the number of lanes used by AD7779. Signed-off-by: Ioana Risteiu --- .../bindings/iio/adc/adi,ad7779.yaml | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7779.yaml index 044f92f39cfa..4a212c8bc9d3 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml @@ -80,11 +80,27 @@ properties: reset-gpios: maxItems: 1 =20 + io-backends: + maxItems: 1 + + adi,num-lanes: + description: + Number of lanes on which the data is sent on the output when the data + output interface is used. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 4] + default: 4 + required: - compatible - reg - clocks - - interrupts + +oneOf: + - required: + - interrupts + - required: + - io-backends =20 unevaluatedProperties: false =20 @@ -107,4 +123,21 @@ examples: clocks =3D <&adc_clk>; }; }; + + - | + #include + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + adc@0 { + compatible =3D "adi,ad7779"; + reg =3D <0>; + start-gpios =3D <&gpio0 87 GPIO_ACTIVE_LOW>; + reset-gpios =3D <&gpio0 93 GPIO_ACTIVE_LOW>; + clocks =3D <&adc_clk>; + io-backends =3D <&iio_backend>; + adi,num-lanes =3D <4>; + }; + }; ... --=20 2.47.2 From nobody Sat Oct 4 09:41:03 2025 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 946D3320CD2; Mon, 18 Aug 2025 13:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522876; cv=none; b=pBENIIimFo/ei43I5Ctv4FsRMGVoiHyW8v8Y3lofqJAFTSPDPvxiNPqlpUnJwBV2ZVANsSbUaKIaMQcfAJ9CdIQm2yXuZ05+YQctr1JwJ5WyzCHiq/RNTahO895a6JgtGEph7/kHnNTWOF0VB2f9ByZ1wWWQK4TgioMZk/8I8x4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522876; c=relaxed/simple; bh=gC6Rovao3McQkrifXwGder8mGO5i4dOLuXjWzLzTizw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WCLwCgZ+oCGCpuARIstmDj3NFwQ0cqs+XYnWJ4SZDXVtRZnETCOews3ywaM7dSxOWzOCjU3Rklt1dVqXIZSBY0j1Lyu8Hgelc9eXYZOiqCP8ifNNjH5bHLSX4ci1MSv4r74AVh+U08qRAmo6Ag/c+KWtgvkctLcdyi0N5jJPzdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=rfLcrDwo; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="rfLcrDwo" Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57ICCKq3025582; Mon, 18 Aug 2025 09:14:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=DKIM; bh=3sVjo 7kPN6V5vNQ77ewA5Q3PCJmVw2Vm/lqGCiwL9Xg=; b=rfLcrDwoREJk1hz/ZT5Dp QiqtHOCSluxbhxi457uiNnUSyyVv8gNL8SyJitlCm/yTTP2fznVylXsAQQhJQ5+N dnHBJS3eeQC/AFULugs5Zn6M5kr2ka2aHLEYvwjXFmRbBrHlny8rSeodd+KQeIK8 B/FM0Nyh0HOAD7uxslss/6D3+uRNDN/Kch96vAyYLO/Y1tDiCULRuyruwYLTnpCn +tLmLznHcMx90tTiTXSv0bt5B58P+MH6sw9vC9fiAxM2carjO4BincWMPWyyJy6s EAAZeCqZvLyDetiDiMf1ijP6VMrsWVaFHlMKbbI8wzWVbhKVcETvlI6+zL37LekI g== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 48kn0sv488-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Aug 2025 09:14:18 -0400 (EDT) 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 57IDEHtB011985 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Aug 2025 09:14:17 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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.1748.10; Mon, 18 Aug 2025 09:14:17 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 18 Aug 2025 09:14:17 -0400 Received: from IRISTEIU-L01.ad.analog.com (IRISTEIU-L01.ad.analog.com [10.48.65.173]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 57IDD8Oo008451; Mon, 18 Aug 2025 09:14:10 -0400 From: Ioana Risteiu To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ramona Nechita , , , CC: Ioana Risteiu Subject: [PATCH v3 3/4] iio: adc: extract setup function without backend Date: Mon, 18 Aug 2025 16:12:49 +0300 Message-ID: <20250818131253.8854-4-Ioana.Risteiu@analog.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250818131253.8854-1-Ioana.Risteiu@analog.com> References: <20250818131253.8854-1-Ioana.Risteiu@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: mNRIKtwdxZ3NofiI9UQxE_fteBCxwp28 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE3MDE5OSBTYWx0ZWRfX0RmmE0vCAs5h tKqFTPQdRml0dUGl/66fDQzJ38eldpYIwKuPoRfO2WvvHO4wQpDqqsZ1uxSatBSAFNwid8lN3P7 trnYFqxHcwoDpqigluWnI2Z9ozR3w/HjUaN0u5z3sK/rnZWEcHsDdanovvVD9TSnwe/88J8fNmm DU2GatwRdAgGimv73GDCJPhWrNf7lezmueh+81LypFu2yGDtfheiAm7donM2djk8v+1dF7OwBPQ X3K7P+NuuqnHuqzi9bfY5DdTTuk0+vOTalK1oxpvm7j2nQ1pVAtyzZjE9ugBSJS6FC3rIqEtAWF Xg9ihBV9TQasVEtnKYxopn4VXE48q/nacpQwXMTKF0B4djFGqgF2JiuJL0w8JBQZFeanvzPCWI5 +U24dQp9 X-Authority-Analysis: v=2.4 cv=T6qMT+KQ c=1 sm=1 tr=0 ts=68a3272a cx=c_pps a=PpDZqlmH/M8setHirZLBMw==:117 a=PpDZqlmH/M8setHirZLBMw==:17 a=2OwXVqhp2XgA:10 a=gAnH3GRIAAAA:8 a=e6B03PNIoHuVPIBsO9AA:9 X-Proofpoint-ORIG-GUID: mNRIKtwdxZ3NofiI9UQxE_fteBCxwp28 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508170199 Content-Type: text/plain; charset="utf-8" Refactor probe function by moving the initialization specific to communication without iio-backend into a separate setup function. The purpose of this modification is better code organization. No functional changes intended. Signed-off-by: Ioana Risteiu --- drivers/iio/adc/ad7779.c | 83 ++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c index 845adc510239..f7e681c0e8c0 100644 --- a/drivers/iio/adc/ad7779.c +++ b/drivers/iio/adc/ad7779.c @@ -752,6 +752,50 @@ static int ad7779_conf(struct ad7779_state *st, struct= gpio_desc *start_gpio) return 0; } =20 +static int ad7779_setup_without_backend(struct ad7779_state *st, struct ii= o_dev *indio_dev) +{ + int ret; + struct device *dev =3D &st->spi->dev; + + indio_dev->info =3D &ad7779_info; + indio_dev->channels =3D st->chip_info->channels; + + st->trig =3D devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, + iio_device_id(indio_dev)); + if (!st->trig) + return -ENOMEM; + + st->trig->ops =3D &ad7779_trigger_ops; + + iio_trigger_set_drvdata(st->trig, st); + + ret =3D devm_request_irq(dev, st->spi->irq, iio_trigger_generic_data_rdy_= poll, + IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name, + st->trig); + if (ret) + return dev_err_probe(dev, ret, "request IRQ %d failed\n", + st->spi->irq); + + ret =3D devm_iio_trigger_register(dev, st->trig); + if (ret) + return ret; + + indio_dev->trig =3D iio_trigger_get(st->trig); + + init_completion(&st->completion); + + ret =3D devm_iio_triggered_buffer_setup(dev, indio_dev, + &iio_pollfunc_store_time, + &ad7779_trigger_handler, + &ad7779_buffer_setup_ops); + if (ret) + return ret; + + return ad7779_spi_write_mask(st, AD7779_REG_DOUT_FORMAT, + AD7779_DCLK_CLK_DIV_MSK, + FIELD_PREP(AD7779_DCLK_CLK_DIV_MSK, 7)); +} + static int ad7779_probe(struct spi_device *spi) { struct iio_dev *indio_dev; @@ -760,9 +804,6 @@ static int ad7779_probe(struct spi_device *spi) struct device *dev =3D &spi->dev; int ret =3D -EINVAL; =20 - if (!spi->irq) - return dev_err_probe(dev, ret, "DRDY irq not present\n"); - indio_dev =3D devm_iio_device_alloc(dev, sizeof(*st)); if (!indio_dev) return -ENOMEM; @@ -804,45 +845,11 @@ static int ad7779_probe(struct spi_device *spi) return ret; =20 indio_dev->name =3D st->chip_info->name; - indio_dev->info =3D &ad7779_info; indio_dev->modes =3D INDIO_DIRECT_MODE; - indio_dev->channels =3D st->chip_info->channels; indio_dev->num_channels =3D ARRAY_SIZE(ad7779_channels); =20 - st->trig =3D devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, - iio_device_id(indio_dev)); - if (!st->trig) - return -ENOMEM; - - st->trig->ops =3D &ad7779_trigger_ops; - - iio_trigger_set_drvdata(st->trig, st); - - ret =3D devm_request_irq(dev, spi->irq, iio_trigger_generic_data_rdy_poll, - IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name, - st->trig); - if (ret) - return dev_err_probe(dev, ret, "request IRQ %d failed\n", - st->spi->irq); - - ret =3D devm_iio_trigger_register(dev, st->trig); - if (ret) - return ret; - - indio_dev->trig =3D iio_trigger_get(st->trig); - - init_completion(&st->completion); - - ret =3D devm_iio_triggered_buffer_setup(dev, indio_dev, - &iio_pollfunc_store_time, - &ad7779_trigger_handler, - &ad7779_buffer_setup_ops); - if (ret) - return ret; + ret =3D ad7779_setup_without_backend(st, indio_dev); =20 - ret =3D ad7779_spi_write_mask(st, AD7779_REG_DOUT_FORMAT, - AD7779_DCLK_CLK_DIV_MSK, - FIELD_PREP(AD7779_DCLK_CLK_DIV_MSK, 7)); if (ret) return ret; =20 --=20 2.47.2 From nobody Sat Oct 4 09:41:03 2025 Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBE2C32142A; Mon, 18 Aug 2025 13:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522880; cv=none; b=bcVxL5xqhAgJIbzUs6QYZNrya0yQB7NP47Bugt09OZJ92I4NbSgIL9XjH/bKhVQRXXjzPw5Idi6ifi7dhps/I52B5ZJbj1xhlU+bwxG69QhntDdyaJmmic6jFWhUywUFmN06UL6Bsv5r2O/fJl+eR0Dgx/dVYCDoxs+j8ngtnWo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522880; c=relaxed/simple; bh=VzaCyAy2htS8qS21zGo3UG++H4hRnYMu/4KgfTGxFhc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RVlbBmcHh/6uyKIAlrP89B0RBIz5vvgZImZ0gmtPNFT8B+G7WDn+RriqBZ5CPOUzOkNAGJ1qp5K95rEJZjuBwD4QptHKtYQz5jr119WECtV3Jt3842yO7Ddk0eTXneV2TdUY5Mjfcm7sGtRJHGYaTWBXqHFV+h6wdRR6QyxN8iE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=gLOWiNOS; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="gLOWiNOS" Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57IBnFQb023229; Mon, 18 Aug 2025 09:14:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=DKIM; bh=isQY0 mAR2XnjXkg8107t7+TbnXq4mjM4Y+HqY56c2MA=; b=gLOWiNOSoTcTSQDb+M29f 9VvKRjj2hmFvTxEDGTDflfjOQ2LGt4QFo5zNZjL4i+ULjrQZ/3/NpJSQ6X3F/QBK +7Xk00S1mG1igkhOq2FVuiKEf4zjOGGfrRDb7qd3hRCdrmXJ/WGU6wbnw8u/Rz1p U2quA2Bg/oH24vkN9ZjDljfGDP2cPby37xR2QJ0xO+geZcrMNnU1FxoxxQB7btqn InUTnW6cSVFn/ixT2DpY2uMyXbOcyQVXMOWQ8SEMkb6skH3lJgS3G66gnzlUFmgE kLxAhMIlmzgA5YpmY93ebnYoEnRU3nqb47hWBOarXmpq55Vedyrp1TlUWd9MTLGd w== Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 48k8afe7ta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Aug 2025 09:14:25 -0400 (EDT) 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 57IDENeo044148 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Aug 2025 09:14:23 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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.1748.10; Mon, 18 Aug 2025 09:14:23 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 18 Aug 2025 09:14:23 -0400 Received: from IRISTEIU-L01.ad.analog.com (IRISTEIU-L01.ad.analog.com [10.48.65.173]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 57IDD8Op008451; Mon, 18 Aug 2025 09:14:17 -0400 From: Ioana Risteiu To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ramona Nechita , , , CC: Ioana Risteiu Subject: [PATCH v3 4/4] iio: adc: update ad7779 to use IIO backend Date: Mon, 18 Aug 2025 16:12:50 +0300 Message-ID: <20250818131253.8854-5-Ioana.Risteiu@analog.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250818131253.8854-1-Ioana.Risteiu@analog.com> References: <20250818131253.8854-1-Ioana.Risteiu@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE3MDA0NiBTYWx0ZWRfX241/XXzW6ukb 3d7D1g74+I/9Sgi/ACKyuXei1qv4QqZHdMn9R2f4+JZImZte99Seo3QyROynwqaif1+Be/N3Oh5 Z/OUPyBICzWXOzAJLGFhkrLOzKfpK49tN+LpBAIJcmjgY74JJ6Ts86V9JwpWL2LBplc1TLYTD5M obn0ta7zeUACIZFd5X2gZwfLNTgUBhpuGDpuR1lG9uKx/btuLdrEl/fnmWsMYm1R6JU7VYQ2Emp xNDgU9WHU039nH7y3UKerDoLMNVLxlZOEvXN7VVx/ci1GghaljIr6/lDZ0+E4DH5Q60ZTC8dlMK g5RV3adHz8djrE1YfANo7XhlwnXmid9aXK1Ao+5adu1j0PLPMGq6Ld7A/MT+tEax+CQ+nl6b0b+ sDtD/Akl X-Authority-Analysis: v=2.4 cv=WvwrMcfv c=1 sm=1 tr=0 ts=68a32731 cx=c_pps a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17 a=2OwXVqhp2XgA:10 a=gAnH3GRIAAAA:8 a=VjRcvFoKhyOr0kwuT1sA:9 X-Proofpoint-GUID: snqDfVzoHa0s5LdFkNtb21qdUZjRAfSE X-Proofpoint-ORIG-GUID: snqDfVzoHa0s5LdFkNtb21qdUZjRAfSE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508170046 Content-Type: text/plain; charset="utf-8" Add a new functionality to ad7779 driver that streams data through data output interface using IIO backend interface. Signed-off-by: Ioana Risteiu --- drivers/iio/adc/ad7779.c | 107 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c index f7e681c0e8c0..abf3fff20dd4 100644 --- a/drivers/iio/adc/ad7779.c +++ b/drivers/iio/adc/ad7779.c @@ -31,6 +31,8 @@ #include #include =20 +#include + #define AD7779_SPI_READ_CMD BIT(7) =20 #define AD7779_DISABLE_SD BIT(7) @@ -157,6 +159,8 @@ struct ad7779_state { u8 reg_rx_buf[3]; u8 reg_tx_buf[3]; u8 reset_buf[8]; + + struct iio_backend *back; }; =20 static const char * const ad7779_filter_type[] =3D { @@ -630,12 +634,38 @@ static int ad7779_reset(struct iio_dev *indio_dev, st= ruct gpio_desc *reset_gpio) return ret; } =20 +static int ad7779_update_scan_mode(struct iio_dev *indio_dev, + const unsigned long *scan_mask) +{ + struct ad7779_state *st =3D iio_priv(indio_dev); + unsigned int c; + int ret; + + for (c =3D 0; c < AD7779_NUM_CHANNELS; c++) { + if (test_bit(c, scan_mask)) + ret =3D iio_backend_chan_enable(st->back, c); + else + ret =3D iio_backend_chan_disable(st->back, c); + if (ret) + return ret; + } + + return 0; +} + static const struct iio_info ad7779_info =3D { .read_raw =3D ad7779_read_raw, .write_raw =3D ad7779_write_raw, .debugfs_reg_access =3D &ad7779_reg_access, }; =20 +static const struct iio_info ad7779_info_data =3D { + .read_raw =3D ad7779_read_raw, + .write_raw =3D ad7779_write_raw, + .debugfs_reg_access =3D &ad7779_reg_access, + .update_scan_mode =3D &ad7779_update_scan_mode, +}; + static const struct iio_enum ad7779_filter_enum =3D { .items =3D ad7779_filter_type, .num_items =3D ARRAY_SIZE(ad7779_filter_type), @@ -674,6 +704,7 @@ static const struct iio_chan_spec_ext_info ad7779_ext_f= ilter[] =3D { =20 #define AD777x_CHAN_FILTER_S(index) \ AD777x_CHAN_S(index, ad7779_ext_filter) + static const struct iio_chan_spec ad7779_channels[] =3D { AD777x_CHAN_NO_FILTER_S(0), AD777x_CHAN_NO_FILTER_S(1), @@ -752,6 +783,44 @@ static int ad7779_conf(struct ad7779_state *st, struct= gpio_desc *start_gpio) return 0; } =20 +static int ad7779_set_data_lines(struct iio_dev *indio_dev, + unsigned int num_lanes) +{ + struct ad7779_state *st =3D iio_priv(indio_dev); + int ret; + + ret =3D ad7779_set_sampling_frequency(st, num_lanes * AD7779_DEFAULT_SAMP= LING_1LINE); + if (ret) + return ret; + + ret =3D iio_backend_num_lanes_set(st->back, num_lanes); + if (ret) + return ret; + + return ad7779_spi_write_mask(st, AD7779_REG_DOUT_FORMAT, + AD7779_DOUT_FORMAT_MSK, + FIELD_PREP(AD7779_DOUT_FORMAT_MSK, 2 - ilog2(num_lanes))); +} + +static int ad7779_setup_channels(struct iio_dev *indio_dev, const struct a= d7779_state *st) +{ + struct iio_chan_spec *channels; + struct device *dev =3D &st->spi->dev; + + channels =3D devm_kmemdup_array(dev, st->chip_info->channels, + ARRAY_SIZE(ad7779_channels), + sizeof(*channels), GFP_KERNEL); + if (!channels) + return -ENOMEM; + + for (int i =3D 0; i < ARRAY_SIZE(ad7779_channels); i++) + channels[i].scan_type.endianness =3D IIO_CPU; + + indio_dev->channels =3D channels; + + return 0; +} + static int ad7779_setup_without_backend(struct ad7779_state *st, struct ii= o_dev *indio_dev) { int ret; @@ -796,6 +865,38 @@ static int ad7779_setup_without_backend(struct ad7779_= state *st, struct iio_dev FIELD_PREP(AD7779_DCLK_CLK_DIV_MSK, 7)); } =20 +static int ad7779_setup_backend(struct ad7779_state *st, struct iio_dev *i= ndio_dev) +{ + struct device *dev =3D &st->spi->dev; + int ret =3D -EINVAL; + int num_lanes; + + indio_dev->info =3D &ad7779_info_data; + + ret =3D ad7779_setup_channels(indio_dev, st); + if (ret) + return ret; + + st->back =3D devm_iio_backend_get(dev, NULL); + if (IS_ERR(st->back)) + return dev_err_probe(dev, PTR_ERR(st->back), + "failed to get iio backend"); + + ret =3D devm_iio_backend_request_buffer(dev, st->back, indio_dev); + if (ret) + return ret; + + ret =3D devm_iio_backend_enable(dev, st->back); + if (ret) + return ret; + + ret =3D device_property_read_u32(dev, "adi,num-lanes", &num_lanes); + if (ret) + return ad7779_set_data_lines(indio_dev, 4); + + return ad7779_set_data_lines(indio_dev, num_lanes); +} + static int ad7779_probe(struct spi_device *spi) { struct iio_dev *indio_dev; @@ -848,7 +949,10 @@ static int ad7779_probe(struct spi_device *spi) indio_dev->modes =3D INDIO_DIRECT_MODE; indio_dev->num_channels =3D ARRAY_SIZE(ad7779_channels); =20 - ret =3D ad7779_setup_without_backend(st, indio_dev); + if (device_property_present(dev, "io-backends")) + ret =3D ad7779_setup_backend(st, indio_dev); + else + ret =3D ad7779_setup_without_backend(st, indio_dev); =20 if (ret) return ret; @@ -943,3 +1047,4 @@ module_spi_driver(ad7779_driver); MODULE_AUTHOR("Ramona Alexandra Nechita "); MODULE_DESCRIPTION("Analog Devices AD7779 ADC"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS("IIO_BACKEND"); --=20 2.47.2