From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36194C433DF for ; Sun, 18 Oct 2020 03:42:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E012920791 for ; Sun, 18 Oct 2020 03:42:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="TCnFUUJA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbgJRDmv (ORCPT ); Sat, 17 Oct 2020 23:42:51 -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-Google-Smtp-Source: ABdhPJyKt2vu+UQe7mohE7fpE2xNkZWK/MOsP5aidY1Da89fHr8wu1ssg4rqURcYAKDAs7OIgsG6cerK0+m+hq6WPrw= 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 > >