Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2004434ybh; Sun, 8 Mar 2020 19:18:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvuTylYnj00kpuEab3nCbl519UOo7g+auxMbz7HOpW/6AUYg/Rzxd2uO7CbctyHr/ZZNg7o X-Received: by 2002:a05:6830:1d7b:: with SMTP id l27mr8903323oti.30.1583720313097; Sun, 08 Mar 2020 19:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583720313; cv=none; d=google.com; s=arc-20160816; b=Jg911PpnzylOKOFhcW62ISmS1CdxUWDRhkBJxB2bGHR0l1xQVBIHe9ZZJ8L4KRS9IH nSU0Sjpz5Yw2u0ECmKQEA4BHD5+NPtPlUbXqN7YUlRgWLwx3iybFY8pBRhOoDyXFl8kJ AHtolAq8jNjp/RtKhJWoOWCRhQGaLbhI7QIIUKUihCQwm1SEAWZcML2UFXNa1PMBrfPv uH9UYvc5Q3iDn/H0/YkxbnD1yTHnjatfS3OmzLVs/0TlfwxXn0e1+UhD5DB0Cxut9+Vc Y1LcO09NNkNdWkMWnHMfiwRJa2d5NR6dnzSGv7YK3Zwuv6ufBNUNlekRLcIee19sjolV +esg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=nG6sxla1tbvju5LQdN16n6VKCetDkzLbHhXFNPW/zVk=; b=WEzyS2oz7ZmYBFBk0CDe9TR8nUW89EQdwwmL2YnHDOGoMIqqmuv+xza3x5TUaEPh5Q aAOL2JQo41Jv7y82Zw+U30IJGn1AyNTuKwy0HZ5XERFLD3RqPiKTWN1yJzlXUfSN8CxP 0NmdoN1WZpfgZBgAgEVYnkvskprCPFcq8UZTCgu86b0DdP9Ml6DYNx0Ux5Z51C2slbkj hlb12SgRMdnkS7XXQgstcM3DEpjdwlAm/6Mh2fEge2PEUZjdyQgeEER5HZzsBR2KtDAw 3MtSPHMQvPElsrt+3o6iyxbkpJiBqHd+u7epI/3Qapw2hupBnzQoah9xp1LobSpb4FEH wCwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si3601537oif.92.2020.03.08.19.18.21; Sun, 08 Mar 2020 19:18:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgCIBib (ORCPT + 99 others); Sun, 8 Mar 2020 21:38:31 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47810 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726490AbgCIBib (ORCPT ); Sun, 8 Mar 2020 21:38:31 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CC89D6C0A121F7AC07DA; Mon, 9 Mar 2020 09:38:28 +0800 (CST) Received: from [127.0.0.1] (10.173.223.234) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 9 Mar 2020 09:38:20 +0800 Subject: Re: [PATCH -next] iio:ad7797: Use correct attribute_group To: Jonathan Cameron , "Ardelean, Alexandru" References: <20200302133249.23152-1-yuehaibing@huawei.com> <8d7a7062af94a3531dd519bd60fe26c8530c6a43.camel@analog.com> <20200307131026.39f55a61@archlinux> CC: "stefan.popa@analog.com" , "Jonathan.Cameron@huawei.com" , "pmeerw@pmeerw.net" , "knaack.h@gmx.de" , "Hennerich, Michael" , "lars@metafoo.de" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" From: Yuehaibing Message-ID: <527d339d-fe32-1121-b83b-4b9385541c37@huawei.com> Date: Mon, 9 Mar 2020 09:38:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20200307131026.39f55a61@archlinux> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.223.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/7 21:10, Jonathan Cameron wrote: > On Wed, 4 Mar 2020 06:35:28 +0000 > "Ardelean, Alexandru" wrote: > >> On Mon, 2020-03-02 at 21:32 +0800, YueHaibing wrote: >>> [External] >>> >>> It seems ad7797_attribute_group should be used in ad7797_info, >>> according to commit ("iio:ad7793: Add support for the ad7796 and ad7797"). >> >> While the change looks good at first, I am thinking that this might introduce >> another issue while fixing this one. >> >> It looks like the ad7797_attributes[] array may also require the >> &iio_dev_attr_in_m_in_scale_available.dev_attr.attr attribute as well. >> It looks like the available scales should be printed for AD7997 as well. >> >> That being said, this patch is fine as-is. >> But it would require a patch [before-this-patch] to fix the ad7797_attributes >> array. >> >> Something like this: >> >> static struct attribute *ad7797_attributes[] = { >> &iio_const_attr_sampling_frequency_available_ad7797.dev_attr.attr, >> + &iio_dev_attr_in_m_in_scale_available.dev_attr.attr, >> NULL >> }; >> >> I'm hoping I'm right about this one. I sometimes don't notice things too well. > > Agreed. Should have that addition as well. If not we'll successfully fix > one issue but drop a valid interface at the same time... > Ok, will send v2 with this addtion, thanks! > Thanks, > > Jonathan > >> >>> >>> Fixes: fd1a8b912841 ("iio:ad7793: Add support for the ad7796 and ad7797") >>> Signed-off-by: YueHaibing >>> --- >>> drivers/iio/adc/ad7793.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c >>> index b747db9..e5691e3 100644 >>> --- a/drivers/iio/adc/ad7793.c >>> +++ b/drivers/iio/adc/ad7793.c >>> @@ -542,7 +542,7 @@ static const struct iio_info ad7797_info = { >>> .read_raw = &ad7793_read_raw, >>> .write_raw = &ad7793_write_raw, >>> .write_raw_get_fmt = &ad7793_write_raw_get_fmt, >>> - .attrs = &ad7793_attribute_group, >>> + .attrs = &ad7797_attribute_group, >>> .validate_trigger = ad_sd_validate_trigger, >>> }; >>> > > > . >