Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5677932imu; Tue, 13 Nov 2018 10:02:14 -0800 (PST) X-Google-Smtp-Source: AJdET5e9U2gZi3KtDBoU5cgacZVzQ+8AP/RJ90TpGekie1Mlw87jis2m979usKdOZh0/1hIAejHG X-Received: by 2002:a17:902:b903:: with SMTP id bf3mr4784807plb.289.1542132134816; Tue, 13 Nov 2018 10:02:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542132134; cv=none; d=google.com; s=arc-20160816; b=NxgayIwkuwmqihU5M4bSLU/Pqndw4skrrIsvu7DvnwxCxaj5jDB3BAAs3dxMQ1CGBW gsOe63JGGbgz2k/bZkAQgpWtTKiGmFRWMgJN7EScF2tPQm5lVp15nuCOgIX+4ktJRNXj d1UuNfQwhpQj8ByQDX0AGPxyzg5o5ZIqLNCYIu3nj2JnAB7GauL+l6JpouozFWMBzapV 6XC8CEkik53im/ow5Cytih4om5N6Dnu4yb0N8I80aRMEHExlPJfnMTUXchhFqsDOIXRY x8RvJwyS0qyfvuXLdbK3AAp/dut2c9xfhi6cI7rh/2hXXump8fzRisjgCPOL6hvi73ZI Srtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=CnANBs6uIc9L7E+u7iw7dXpl4gRmGboqVhWNKQ27XAw=; b=GSAL1JthNr4HSZffqvPrb6q8ELAmYxliXp0bqQBSXKbeIkGDGUUsk6nHQEld62jt7t y6BMcNLQZU6S0LjY7cZjt/g4B3tRGh6aplcfOCuGSqe0Ss0F1sN4Idxeh+yPl+cYQwi3 KVyNTXlZdcvcaRioQhV9vp937oc0v13EvWoscnwqtwKQWPuJjTBqZ92aMhLp6h2ns9R+ ovHydfHwQD+wr9p1N72LWlQJ/Tw/TFxitUoPb1ROpuxnmAiBlJ3P12/ABLo5DcD6qLPU 2LddSYFAzj3Ea2KONBEpkeBHgKqPPAoArT3coKocIwEPanwyqoICkGAY3EPRkJtE5gjt LsfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="dh/jooX4"; 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 p64-v6si23186817pfg.45.2018.11.13.10.01.40; Tue, 13 Nov 2018 10:02:14 -0800 (PST) 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="dh/jooX4"; 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 S1732367AbeKNEAK (ORCPT + 99 others); Tue, 13 Nov 2018 23:00:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:33134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730995AbeKNEAK (ORCPT ); Tue, 13 Nov 2018 23:00:10 -0500 Received: from localhost (unknown [104.132.0.74]) (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 20BF0208A3; Tue, 13 Nov 2018 18:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542132059; bh=J3uakpHh7fKeIIghnPM2AVAXKvYmkkCidCykd9D6JQ8=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=dh/jooX4RltuT40Ow4QYJ9VcRWFPFBY9fBrhefh5ItjP229HQID5qGmUwRNJpvmR1 18z3RP58qqA06LQThm4YRkenSdUd12GPBJlJ3WcBfgfSl6MqCSFpG7tOk4dijuMJ5J mHUX6Cy5WUzdw9I2sONPACLBRPx7wUYjhjGEksnQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Ryder Lee , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= From: Stephen Boyd In-Reply-To: <20181113095210.mh3iy5tcsu6w6tem@pengutronix.de> Cc: Thierry Reding , Rob Herring , linux-pwm@vger.kernel.org, Weijie Gao , Roy Luo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, John Crispin , kernel@pengutronix.de, linux-clk@vger.kernel.org, Michael Turquette References: <4c9044427b1aab373acd6ac76f0c905e2be79784.1542074855.git.ryder.lee@mediatek.com> <20181113095210.mh3iy5tcsu6w6tem@pengutronix.de> Message-ID: <154213205843.88331.7023190778461777093@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks' Date: Tue, 13 Nov 2018 10:00:58 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Uwe Kleine-K=C3=B6nig (2018-11-13 01:52:10) > = > I wonder if it would make sense to introduce functions like: > = > struct clk *clk_get_optional(struct device *dev, const char *id) > = > that return NULL instead of ERR_PTR(-ENODEV). > = > Then the above would simplify to: > = > pc->clks[i] =3D devm_clk_get_optional(&pdev->dev, mtk_pwm_clk_nam= e[i]); > if (IS_ERR(pc->clks[i]) { > if (PTR_ERR(pc->clks[i]) =3D=3D -EPROBE_DEFER) > dev_err(...); > return PTR_ERR(pc->clks[i]); > } > = > (added the clk people to Cc for this question). > = Such a patch is already on the list and not getting much review. http://lkml.kernel.org/r/1535724443-21150-1-git-send-email-phil.edworthy@re= nesas.com