Received: by 10.213.65.68 with SMTP id h4csp2774829imn; Mon, 9 Apr 2018 08:50:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9WUn336gBzKoH/qSyq5+YXxh/OVkrzU2z5KpPKkfc2/VeWiPo7QVPmexrs9mdzALcZ4n+ X-Received: by 2002:a17:902:a9c2:: with SMTP id b2-v6mr5352439plr.181.1523289043193; Mon, 09 Apr 2018 08:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523289043; cv=none; d=google.com; s=arc-20160816; b=TdpzpTj1D0KDLrmVMQ4pEOKtRTzvauWOCORgLaEweEc30KnKGsBUIJmcWgNYSO9wAC AbGZciTg59s5Br0ojhv+DF5DCzk6VaYdq/255xHoPr4a3U/kJMzP5MYz5c+bOsTr2Z1p wJDQmVXKarSTtU+QWTaXW2r4NIfv/kj4aP/qftogBlzWXO3LPLSPAjrCjJDSF7PWjVFR O4TZmr8I+Fli2VsvrjzDp8XTE4BuutM2qut45RqK9p/PAL8f94XEqsdDnHnh/PuQYKy0 yZamKW6HJUntJBJo3RUESdUkJPhYlMBlFDMwoxR/+8d3nHr97MMATVdhNcKutOjmYYwZ OfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=2zlrXU6uYUOR0oMQqBXGHGbMj/J2vBfzxTwUdwsk7ZI=; b=iMuXTPz09JhEAbMb7cmMabWi47DU5xw53wq9wbcJF2NvxEszoZK/jsM6IGXx5ay0wh jnNVJjuc7q88G2stMwl7BjwLSRyWKSddsGQTRT0fxwp0FLIhQ6sFzYazzfEOkRJ9WVLx 3gsfPG2BC6ZNHLGsbLCqCw1+kMWKW5uWN/zBJUtz8bb7r8Y5FCGSzS6I5UZVmFetnEvA 6HZquSFOwfK+20LgxrtAKPtR7DHeUxvCxoe+guKmeKbh6H3umdw7myCcC2JWVVX6togY JU/iz9Cvv6ITtTElb7yTZZlORFPrNp9MsnQlW7rtFyqO/RzM2KWP4jQVIK6pjHCK4pPJ EkxA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si384264pgr.636.2018.04.09.08.50.01; Mon, 09 Apr 2018 08:50:43 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbeDIPq5 (ORCPT + 99 others); Mon, 9 Apr 2018 11:46:57 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34730 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753217AbeDIPqy (ORCPT ); Mon, 9 Apr 2018 11:46:54 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 53BB9268B5A Date: Mon, 9 Apr 2018 17:46:49 +0200 From: Sebastian Reichel To: Dan Murphy Cc: Lee Jones , Daniel Thompson , Rob Herring , Tony Lindgren , Jingoo Han , Mark Rutland , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCHv4 06/10] mfd: ti-lmu: add PWM support Message-ID: <20180409154649.6zpqjsh4psblmlw7@earth.universe> References: <20180330172414.26575-1-sebastian.reichel@collabora.co.uk> <20180330172414.26575-7-sebastian.reichel@collabora.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tpkq2w5powuflht6" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tpkq2w5powuflht6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Apr 04, 2018 at 02:04:16PM -0500, Dan Murphy wrote: > Sebastian >=20 > -Milo >=20 > On 03/30/2018 12:24 PM, Sebastian Reichel wrote: > > This adds support to acquire the optional PWM channel, > > that can be used by some of the LMU variants. > >=20 > > Signed-off-by: Sebastian Reichel > > --- > > drivers/mfd/ti-lmu.c | 11 +++++++++++ > > include/linux/mfd/ti-lmu.h | 3 +++ > > 2 files changed, 14 insertions(+) > >=20 > > diff --git a/drivers/mfd/ti-lmu.c b/drivers/mfd/ti-lmu.c > > index ce16c896879b..f43b8acc30e1 100644 > > --- a/drivers/mfd/ti-lmu.c > > +++ b/drivers/mfd/ti-lmu.c > > @@ -183,6 +183,17 @@ static int ti_lmu_probe(struct i2c_client *cl, con= st struct i2c_device_id *id) > > return ret; > > } > > =20 > > + lmu->pwm =3D devm_pwm_get(dev, "lmu-backlight"); >=20 > Patch 9 of this series, or a derivative of it, should technically > be before Patch 6 so that the binding is correct. Otherwise the > binding will not match the code. I guess the binding update should be the first patch. I will change this in the next revision. -- Sebastian > > + if (IS_ERR(lmu->pwm)) { > > + ret =3D PTR_ERR(lmu->pwm); > > + if (ret !=3D -EINVAL) { > > + dev_err(dev, "Failed to get PWM: %d\n", ret); > > + return ret; > > + } > > + > > + lmu->pwm =3D NULL; > > + } > > + > > ret =3D ti_lmu_enable_hw(lmu, id->driver_data); > > if (ret) > > return ret; > > diff --git a/include/linux/mfd/ti-lmu.h b/include/linux/mfd/ti-lmu.h > > index 1ef51ed36be5..246ab5145dff 100644 > > --- a/include/linux/mfd/ti-lmu.h > > +++ b/include/linux/mfd/ti-lmu.h > > @@ -17,6 +17,7 @@ > > #include > > #include > > #include > > +#include > > =20 > > /* Notifier event */ > > #define LMU_EVENT_MONITOR_DONE 0x01 > > @@ -77,12 +78,14 @@ enum lm363x_regulator_id { > > * @dev: Parent device pointer > > * @regmap: Used for i2c communcation on accessing registers > > * @en_gpio: GPIO for HWEN pin [Optional] > > + * @pwm: PWM for module [Optional] > > * @notifier: Notifier for reporting hwmon event > > */ > > struct ti_lmu { > > struct device *dev; > > struct regmap *regmap; > > struct gpio_desc *en_gpio; > > + struct pwm_device *pwm; > > struct blocking_notifier_head notifier; > > }; > > #endif > >=20 >=20 >=20 > --=20 > ------------------ > Dan Murphy --tpkq2w5powuflht6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlrLiuYACgkQ2O7X88g7 +posSRAAlli1Akbn8Lc5ct+xa3qxcis9mMFxlSTF9Qt9EL/D5vcMUK/7KVABjrV2 P3J16CF8JeIAhND2ewSniZ95ePuGdN/gzTo0D97oSJSRMrfe6v/6uFERT9rUMsvV M43SFDh+O+fNlLP1hX+vachaZ6CeWybBNvdvrUjGcv9elchL+WroAp6KwJFAahHF ikHBH3efaz5gT9dkSQF6Hp4HPIWD/IsHk8gyDW7IqXWFD6ailwbJTL8cAnN9XOTf R9bjVN6utZXFSzjE+L7Z2YBzEN2/8Zn37mbJzqJBB2D+p+yU3Lcm7xn7648vBn4m +xD0hxqNfkG5zYwL1d2MOgM2gdnog7OoXXGja6GInjXSStkbfQHcaC/rANHFFtvT sCHpagu8wiN+uJMU/FeWH5ysfiUPA7b3lzig2nm8ZezYuoHN3qGvkxPf7GpXuEgS bQRI0Y3uc/5/5NiHGCgsqz4mQVwwWm90vlWdXcZxqKNs84iWHSNr4ihI+hRMgvDT hBJxRXXVy2iC1m90tRZPh/2gKwjsGe7FIKP90Kj8pmOlZZJ66/lcix1RhOebqE4R cJaZUK/Jpf9VCZWoJdFKDEr3uPcxN/mBZHg74tx8M+3he0Vdqfo05buTN+ZOvPcE lo/kltHm9rAGYKvuQugoFpiV8YvGm3ZYGCjIIcoilcDc5R/KJkQ= =TF2c -----END PGP SIGNATURE----- --tpkq2w5powuflht6--