Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1560954ybh; Sun, 15 Mar 2020 05:51:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuW9Rz+vfkbbwdLHJ3UsSu4GrgHoCXjM2z3q4xI9zWMwaDEGtiUNYEpkW8gHsWC8go8ztW2 X-Received: by 2002:a9d:6142:: with SMTP id c2mr1307627otk.92.1584276683326; Sun, 15 Mar 2020 05:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584276683; cv=none; d=google.com; s=arc-20160816; b=P2AnL6gV6olBDB8UcHrdz73Nyk3wGCQzQ02zkqSXTWHxRNe5i/PLKgU7Re9r9kAonR FwkWMKuZ2Ycd+HVCzKCUH/rqKCLGV7zNO988Zpr7FBX84Gd/5fjMW0gVUfGALK8CKlML MkikH9WVfiLGlwHAOHfkBJszZfJ2Wykjzi4kzjjcW8TlC0XMEK0Ya5rQ2FkxSj28BgeX IaaaSKTnd0le5pL7YsbmiAh/h1Ht5pMb4pvtkHk0o76WoWYvP3lpHTBUQutaQl5H6iTT zovna6vsKb4KKDhzMqgaWB1JV21IupzqpqAdx9305Sr/QPlPONnsx342zav3W7IZ+2bf 1etA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RxjOxHF4vVPqURIfmRRY8DTZckeW+UPFEoLnl81Ymhc=; b=CoSeDzIoPwbpEb+Seo2LoX+jPvRPolXaRXJjPRJPISW/6a61IkLnexTBUwQVNEncX5 Ty9/Trte3Vq85Zo5E0UZEnvHl8QyBKUPHppSgnir6FLCvl4ax/rACT+OC/qrOaz/mGBI IB8Fmn0XK5iUcYW+943qSj733mNkhR9louq/G1ubjne94fD67StgOEbH2y03+4k4+niC E+7TJxOXezo5wmVyYXsL4Gawj8xAOrKta36G3CWUtEIf8ghU+BFIYs6mQEfbw2VJn/q8 bQZPDzmvUSU817pGNKzL6yEQGScg0YOpK3wy6obXGrKstDH2bWQF0WNjfZOm1sZyThB8 7ldA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NUJ6pbs0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a128si761471oif.202.2020.03.15.05.51.10; Sun, 15 Mar 2020 05:51:23 -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; dkim=pass header.i=@kernel.org header.s=default header.b=NUJ6pbs0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728533AbgCOMun (ORCPT + 99 others); Sun, 15 Mar 2020 08:50:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:40114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728410AbgCOMun (ORCPT ); Sun, 15 Mar 2020 08:50:43 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E938E205ED; Sun, 15 Mar 2020 12:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584276643; bh=tSUX5BtR0r5shVkJhiBSsjEhd6hJK8EV8By9+NiYji8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NUJ6pbs01C+UoQMm4altkbimFzj4hq+5lJT3bJdtivP2WzevDKmLpjIquh31vEi8M kH+lo1CVFvqgTPkHVRDX8QPRbloZdLPngsYShTc7+ZwK+S13rnW32SpREupkTj+H08 7ZnFsKn8dBKuLH6uw/IQt0DJ+fk22aS96Zih21j8= Date: Sun, 15 Mar 2020 12:50:39 +0000 From: Jonathan Cameron To: Rohit Sarkar Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, alexandru.Ardelean@analog.com, dragos.bogdan@analog.com, Matt Ranostay Subject: Re: [PATCH] iio: health: max30100: use generic property handler Message-ID: <20200315124955.207d515c@archlinux> In-Reply-To: <5e6afe0d.1c69fb81.25912.f2eb@mx.google.com> References: <5e6afe0d.1c69fb81.25912.f2eb@mx.google.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Mar 2020 08:59:13 +0530 Rohit Sarkar wrote: > Instead of of_property_read_xxx use device_property_read_xxx as it is > compatible with ACPI too as opposed to only device tree. > > Signed-off-by: Rohit Sarkar Look at how this driver is probing from DT. There is another thing you need to do to make it possible to use PRP001 ACPI based bindings. (check what Andy Shevchenko did in a similar patch) I'm being deliberately vague as useful for you to understand what is going on here for yourself :) Also, make sure to check you have cc'd everyone relevant. Here you are missing the driver author. +cc Matt Jonathan > --- > drivers/iio/health/max30100.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c > index 84010501762d..8249c6b36818 100644 > --- a/drivers/iio/health/max30100.c > +++ b/drivers/iio/health/max30100.c > @@ -16,7 +16,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -267,11 +267,10 @@ static int max30100_get_current_idx(unsigned int val, int *reg) > static int max30100_led_init(struct max30100_data *data) > { > struct device *dev = &data->client->dev; > - struct device_node *np = dev->of_node; > unsigned int val[2]; > int reg, ret; > > - ret = of_property_read_u32_array(np, "maxim,led-current-microamp", > + ret = device_property_read_u32_array(dev, "maxim,led-current-microamp", > (unsigned int *) &val, 2); > if (ret) { > /* Default to 24 mA RED LED, 50 mA IR LED */