Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2312235pxu; Sat, 17 Oct 2020 20:56:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwM/mqrFm9yw5JuK+KJFCHwBLu12beeoVfX88PlG/2VQorEP6CT6sLrLD8dWQb0+utX4ps X-Received: by 2002:a17:906:5402:: with SMTP id q2mr11071569ejo.316.1602993406860; Sat, 17 Oct 2020 20:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602993406; cv=none; d=google.com; s=arc-20160816; b=bNaobiUaS3rOjMTJ8RDydcFEGT2MPvZ0N0wM6JZKfN1AMSc0x+pZQP9GkVT4iVgZgA A8WDc2qWV+WcIGuceG/3jAsFrNtghrOBu+rxEsBsNzlKj6qRVqwLXZ7QO0NTM6OVC7r0 m6iehZ5yu7rgIlPJXPfpvF5JxHYSVlhzeGrIxnEOZ4y9f4tbgyJpr0x0kTgl7WtpBzJ8 RfukePlv1GDXJLdSPLNEnyA8JlO0JekZqNskkJ/R5TbKyCx1CmHvO/7xIuo4rqQl5p6J xgggL8dV6FGibc9qwovzLuIksJKTYK+yp6gB/bvnwXgL9xr4/dXxVJxj6fNBRur2R164 lLPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XkSGQdL943VDrsmdb10J5hX95hPmKoJSkrx0ICPNPW0=; b=xuVHGuEj1Jq5gAO3Gz26p1tzWyTT7sCFtH3xY7YZdHR8BgeXkyiA3Jucpf1cqA1Pb0 cE3zZGwskdz8Jkng2yJ1l6JeQzuCcLV4XBwpX51CvWyK+O5lCnFRH5Eechrtk0GWwDmk sitNK6oD9Bk8XBJTvW0kRwNzHyXACkZHbdhZYniPyJk2RdZM7qFalM6n4FYv4cXYu2Mu ppbdP12qsXH+arxA/NzhEB+6Nu2zWM4CEaKbKh+cx/2Ot4dOJ2E5+k6PBnuAoDzJMraJ zIEkdR+9sgNd1L+p1ggAzS1B+nhlF/IUl9fWRQKCQRL+oIJZW7KESPyx2txpt9qUvrE7 rzaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=TCnFUUJA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si6160918edx.342.2020.10.17.20.56.24; Sat, 17 Oct 2020 20:56:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=TCnFUUJA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725972AbgJRDmu (ORCPT + 99 others); Sat, 17 Oct 2020 23:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgJRDmu (ORCPT ); Sat, 17 Oct 2020 23:42:50 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D20ABC0613CE for ; Sat, 17 Oct 2020 20:42:48 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id d20so8976324iop.10 for ; Sat, 17 Oct 2020 20:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XkSGQdL943VDrsmdb10J5hX95hPmKoJSkrx0ICPNPW0=; b=TCnFUUJA6ByeCjESWJiknlx0A9asFOS/Rh1WDSbB+B2yBoASTB37VGBFuUo+K1ecz1 qKYaHeW/Hjqf30ZBArkJaoXz9hpEe71q+nupYlxzj0hbl/sJoRs3eyk3cKPEHMdF7kyU vmC4KS1HSEPQdkUu9UOksa5ESXscA18ugjLvwgeKPlSMIrS3rigzBGTzaTrUsyiVZslF hmD+S2lKxHngwyTEloVWPojBvTyZdD99WTJIQcr3UfUtz8PSwkGlOdJagNRTtD37mUrx zP53q1nyPthMXKPwb/Cz7ruklAYlHZyb7vI3PwnMVRU5JhIVVVu7IFVwVBiqpIi0+zz4 MaNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XkSGQdL943VDrsmdb10J5hX95hPmKoJSkrx0ICPNPW0=; b=JJYbMKXEq0hvLR6zLJ/uXvLdgBbXVhEcXKw12971ic0Iw3DEHSPD9YkBTp4fOBwwAD F8ntRW/XCirBGMHDfl4wvcyDl9nuMElY6d5oKg8F4QJ9TleZ/+BtVKZCsZMuLfnJH/QO d6EW30p0kye/QqhosO/PDxxyVHP5815OhoRgX2y2QGpcJV/ztmAsZm6Sl2gbJgLYHbze j7RXn8Sq7rYfr3+5TM6rUtA+TMruM3xggw9bhHHQDLfWEiEAtMr2h9ymfEegcIgdlBhH cKEwk1dpi545SGiv0HRga3HQDQtTJjzfP6ECHHZbJWDJOc3OtZDp9dpFIXO6Xws29BZe QCYA== X-Gm-Message-State: AOAM532GfkMZmi27cHAeTag9GZiGgCCfa9nQXTQspqt1Nty77b7XXCNs teygyIKbCT1ksZU5HJKQlkPAypIl36wMkCjPlMec X-Received: by 2002:a6b:bfc7:: with SMTP id p190mr7044490iof.121.1602992568129; Sat, 17 Oct 2020 20:42:48 -0700 (PDT) MIME-Version: 1.0 References: <20201016184002.GA15797@ubuntu> In-Reply-To: From: Vaishnav M A Date: Sun, 18 Oct 2020 09:12:37 +0530 Message-ID: Subject: Re: [PATCH] iio: proximity: as3935 change of_property_read to device_property_read To: Matt Ranostay Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Alexandru Ardelean , Linus Walleij , "open list:IIO SUBSYSTEM AND DRIVERS" , open list , Jason Kridner , Drew Fustini , Robert Nelson , =?UTF-8?Q?Ivan_Rajkovi=C4=87?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 18, 2020 at 3:57 AM Matt Ranostay wrote: > > On Fri, Oct 16, 2020 at 11:41 AM Vaishnav M A wrote: > > > > > > This patch aims to replace the of_property_read_u32 for reading > > the ams,tuning-capacitor-pf, ams,nflwdth properties with > > device_property_read_u32. > > > > Thanks and Regards, > > Vaishnav M A > > Could you explain a bit more in the commit message why this is needed? > > Also you pop comments that shouldn't be in the commit message below > the "---" line :) > Thanks for pointing this out, sorry for the mistake, I have updated the commit message in the new v2 patch: https://lore.kernel.org/patchwork/patch/1322170/ > > > > Signed-off-by: Vaishnav M A > > --- > > drivers/iio/proximity/as3935.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c > > index c339e7339ec8..7e47ddf89a56 100644 > > --- a/drivers/iio/proximity/as3935.c > > +++ b/drivers/iio/proximity/as3935.c > > @@ -355,7 +355,6 @@ static int as3935_probe(struct spi_device *spi) > > struct iio_dev *indio_dev; > > struct iio_trigger *trig; > > struct as3935_state *st; > > - struct device_node *np = spi->dev.of_node; > > int ret; > > > > /* Be sure lightning event interrupt is specified */ > > @@ -374,7 +373,7 @@ static int as3935_probe(struct spi_device *spi) > > spi_set_drvdata(spi, indio_dev); > > mutex_init(&st->lock); > > > > - ret = of_property_read_u32(np, > > + ret = device_property_read_u32(&spi->dev, > > "ams,tuning-capacitor-pf", &st->tune_cap); > > if (ret) { > > st->tune_cap = 0; > > @@ -390,7 +389,7 @@ static int as3935_probe(struct spi_device *spi) > > return -EINVAL; > > } > > > > - ret = of_property_read_u32(np, > > + ret = device_property_read_u32(&spi->dev, > > "ams,nflwdth", &st->nflwdth_reg); > > if (!ret && st->nflwdth_reg > AS3935_NFLWDTH_MASK) { > > dev_err(&spi->dev, > > -- > > 2.25.1 > >