Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1980750ybz; Thu, 23 Apr 2020 09:27:24 -0700 (PDT) X-Google-Smtp-Source: APiQypJnt8Hs0asPVeNofYmev/Wz5Lvjtu+MI+unbEctk19SSKHIYEaZjQeEDCvoPvDqa5Oc/1y7 X-Received: by 2002:a50:85c4:: with SMTP id q4mr3165431edh.147.1587659243971; Thu, 23 Apr 2020 09:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587659243; cv=none; d=google.com; s=arc-20160816; b=AOJr7s4taVTmLkeYrN7MqZu5k7M6zbbbYbWmonfzISyjBVEo4BVbP9mR9HyZX1CySl TwFgdGcnddmHKDUHvZXP/IC8Ffc9UfUmCJlRSGOyvuJpRi3aa6sCyBb7DqZX3AKfRgTP 5WRwhNFLU2bVRUnAuSjvgljw/uuQvaFqOnvKXQZCysI4IKcOmoRDE9w1re62xg5we9Cs FJtq4Es3A61WX5l+ebsVGWkAtZKBgZIr7hezvMWEkDwgd2D9TRJM420lpuqpb73PFzzH XXndVAzSeOKHfGeGvWMncgqjMgHNKoVK032hg7UWJI6sm8LJAx22om1RmmMnFLZDx+pK rI7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=K2AntMmi33Ao5D8wdOryDZGzd8Gg6zpgS6qscTK/i+g=; b=wycvfxqVHzqG0y05MLwmZDuzoWtmkYN2acuKAChsPYvpxxQTM+fPdR3LHH76ZcM949 dXdzg0oi2OFzLYNw4eDXmtLZpXGX+xeQUXOXdrX69bw8NijF0iOddnnkZOac0LRz99SK X4ZQ5nNmGtJc4CJZ+ei8dtwvRybtRD4ZEMHtJeRr1DBavpSDTP9xeJQ1OmDiv3ME9uCY DWxT3G5yTPeLBUBkG3Yego3QEU2kVR1lMLKMQOHy8ppWPjBzPM64GY7W9dB0tOtAFNSe GbCvHGiiCmEDU/nRTgz7xQ3M/WbCaZlaqrnGSyhrqPzQ6Ysi/ObJ/p/45wGbURBMi95q CBFw== ARC-Authentication-Results: i=1; mx.google.com; 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 n12si1384217edo.392.2020.04.23.09.27.00; Thu, 23 Apr 2020 09:27:23 -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; 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 S1729501AbgDWQZM (ORCPT + 99 others); Thu, 23 Apr 2020 12:25:12 -0400 Received: from smtpout1.mo528.mail-out.ovh.net ([46.105.34.251]:47439 "EHLO smtpout1.mo528.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729422AbgDWQZL (ORCPT ); Thu, 23 Apr 2020 12:25:11 -0400 Received: from pro2.mail.ovh.net (unknown [10.108.16.61]) by mo528.mail-out.ovh.net (Postfix) with ESMTPS id 39DD75A9F339; Thu, 23 Apr 2020 18:25:09 +0200 (CEST) Received: from localhost (89.70.31.203) by DAG2EX1.emp2.local (172.16.2.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Thu, 23 Apr 2020 18:25:09 +0200 Date: Thu, 23 Apr 2020 18:23:46 +0200 From: Tomasz Duszynski To: Andy Shevchenko CC: Tomasz Duszynski , linux-iio , Linux Kernel Mailing List , devicetree , Rob Herring , Jonathan Cameron Subject: Re: [PATCH 3/6] iio: chemical: scd30: add serial interface driver Message-ID: <20200423162346.GD43448@arch> References: <20200422141135.86419-1-tomasz.duszynski@octakon.com> <20200422141135.86419-4-tomasz.duszynski@octakon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: X-Originating-IP: [89.70.31.203] X-ClientProxiedBy: DAG2EX2.emp2.local (172.16.2.12) To DAG2EX1.emp2.local (172.16.2.11) X-Ovh-Tracer-Id: 13935544623297223839 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrgeelgdejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfhggtggujghisehttdertddttdejnecuhfhrohhmpefvohhmrghsiicuffhushiihihnshhkihcuoehtohhmrghsiidrughushiihihnshhkihesohgtthgrkhhonhdrtghomheqnecukfhppedtrddtrddtrddtpdekledrjedtrdefuddrvddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehprhhovddrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehtohhmrghsiidrughushiihihnshhkihesohgtthgrkhhonhdrtghomhdprhgtphhtthhopehjihgtvdefsehkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 10:55:05PM +0300, Andy Shevchenko wrote: > On Wed, Apr 22, 2020 at 5:22 PM Tomasz Duszynski > wrote: > > > > Add serial interface driver for the SCD30 sensor. > > ... > > > +#include > > Do you need this? > > > +static int scd30_serdev_probe(struct serdev_device *serdev) > > +{ > > + struct device *dev = &serdev->dev; > > + struct scd30_serdev_priv *priv; > > + int irq, ret; > > + > > + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > > + if (!priv) > > + return -ENOMEM; > > > + irq = of_irq_get(dev->of_node, 0); > > fwnode_irq_get() ? Okay, that should work equally good. > > > + if (irq <= 0) > > + irq = 0; > > + > > + return scd30_probe(dev, irq, KBUILD_MODNAME, priv, > > + scd30_serdev_command); > > +} > > -- > With Best Regards, > Andy Shevchenko