Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp31501rdg; Tue, 10 Oct 2023 03:27:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHypvliKZWtq+EI/R6n/Qu+nEGR7f+ZjERZIqQqqyc5W5ZcJVSyIgoQ7hjlwQz5/EAToqPX X-Received: by 2002:a05:6a00:84b:b0:693:3cac:7897 with SMTP id q11-20020a056a00084b00b006933cac7897mr18246971pfk.9.1696933644883; Tue, 10 Oct 2023 03:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696933644; cv=none; d=google.com; s=arc-20160816; b=lFfW1hMpO3pmFz3wb/Q9BZ7IlyiLOjVFRUZund9EeuIeld2pPy7i32bRjgsZu9FxaB zG6nEG21wfbx0NtfpnCFPaWyUsOBPOI7pE3E3BRQhlD/3X9nU4ulfwSFPgXloOxM/M5c qEmzV7ZsrPbr4GQSSdji+n6mH4IX927BBy/JY1WXqV/TrzBSyQ1Dc0Gbiba8VCj05IBZ aa74AWjKlJXb6UpR7qtBxNaLV4ohx67ZJlZaMngvaAyexOsGPTnMRZV08qVqB77+hCCk ej3hhDsjJUWjZsS5avywjwLbblbmbLkxioGXNJl7betUjVh8+ItfJi1d8COEQdBbGbWO tizQ== 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:subject:cc:to:from:date :dkim-signature; bh=xF4CZxRz0Sv+tC+y5BLv7MXZYkEgamXZIX0SDbrZLVc=; fh=LGIo6UiLGvexTnmCMOv//ZSEWqcKOHT7Wyn67ZdZXB8=; b=GiUUHG9ig7MlV1md06kO5zSqu6nfl2DqCBL1urqNpojBVseztxolC6UDH6O4vPEq5f n4vZ7f6uLBkCECFTmH/bYpwo46VHsSeQYChhsUAkGWtw4xuogcJ7+8S03CUgtsouRdsz GnLqEyx7rhxoKXDtuVEOjSyAaTFXavDvRPBzeOmJsV38e1sNKHeA/tWVEIXwL5XZplKA 4VmWwPZz2q3JDpcKDyNBMgK18jy0+SPHv+za2IhsFvJ2kJWkMXOKQii1307b3Bi/LZF8 w//WPa6bUc3AQaqX/JzZWg8ERbh5HnVxYhhdIQhwbjmAow7fGtRpsuuKyBhOQzaFCwyB ZLGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SjGJc9OX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id f20-20020a63f114000000b00565f24af893si11499123pgi.22.2023.10.10.03.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 03:27:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SjGJc9OX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E474280D0805; Tue, 10 Oct 2023 03:26:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbjJJK0U (ORCPT + 99 others); Tue, 10 Oct 2023 06:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjJJK0S (ORCPT ); Tue, 10 Oct 2023 06:26:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59181AF; Tue, 10 Oct 2023 03:26:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1584EC433C8; Tue, 10 Oct 2023 10:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696933576; bh=PqLwa/jUv0/v1YHnMTFC+aJ+JxMcrb9OrAWtpCIlSVI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SjGJc9OXY4TmtAKccg9N8dWKXu8WN0fawl0VNIqj4TJBQLwfeThvQ3cim64MtrDnB AVWMnva+eyVktQHmkI83jbsmtWTb+rErQJXK6MnNAlQ4lcLJeokGNc1gK4J1TYqpnr PR0B4014dStxg2v6nFC8wMyixp1gHgFgnnKNGx727ZX7eNSwNwO41WrlpJI2ruxMMd /zvhFNesw7t+FDLmr6SBAMc2w40IrqAirb7fQtlvE9Wh1JROnQyS25hJ595Ea7mY0M jcR9TnVdL02Yeab6mJGg1e20cS+HnjZyOwLau5LurYQpHxZe+s+DldxxueWEgdfYRz T9RGc0ZpcLsQA== Date: Tue, 10 Oct 2023 11:26:21 +0100 From: Jonathan Cameron To: Ceclan Dumitru-Ioan Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , Leonard =?UTF-8?B?R8O2aHJz?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] iio: adc: ad7173: add AD7173 driver Message-ID: <20231010112621.0b371e74@jic23-huawei> In-Reply-To: <07afa29c-bfef-72dc-d471-f72dfcebe342@gmail.com> References: <20231005105921.460657-1-mitrutzceclan@gmail.com> <20231005105921.460657-2-mitrutzceclan@gmail.com> <20231005180131.0518f46c@jic23-huawei> <07afa29c-bfef-72dc-d471-f72dfcebe342@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 03:27:19 -0700 (PDT) X-Spam-Level: ** > > >> + chan[chan_index].differential = fwnode_property_read_bool(child, "bipolar"); > > > > bipolar doesn't normally == differential. > > You can have unipolar differential (just that you can't get a negative answer) > > Perhaps just a terminology thing? > > > > This device supports only differential channels. Here, the differential flag is used to show > if bipolar coding should be used. I'm confused - you are setting differential in the iio_chan_spec with this. That affects the sysfs naming and a bunch of other stuff - not merely the bipolar nature of the channel. > > > >> + st->info = device_get_match_data(dev); > >> + if (!st->info) > >> + return -ENODEV; > > This works for the cases of DT and ACPI but not for anyone just > > using the spi_device_id table. > > There is spi_device_get_match_data() to cover all options. > > > I could not find the spi_device_get_match_data() function in the repo. > It appears however as a suggestion from Andy Shevchenko in a thread: > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2382960.html > Is this it? ah. I got the name wrong. spi_get_device_match_data() https://elixir.bootlin.com/linux/v6.6-rc5/source/drivers/spi/spi.c#L364