Received: by 10.213.65.68 with SMTP id h4csp1072310imn; Wed, 4 Apr 2018 12:06:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Apryb1POw1oCxhw64yyygl354CIdI92+vPQm6f+g8Js5excB8mtRlmfHQtv00hZ5aUsAL X-Received: by 10.98.163.74 with SMTP id s71mr5649921pfe.72.1522868767562; Wed, 04 Apr 2018 12:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522868767; cv=none; d=google.com; s=arc-20160816; b=xkB4EcvN5evdA0M5QVtZrM/h4PeaVl1cTdlHtUxiQmKKjKdGTdCQCq62tHz//LLu9S XPTv3/3V/3QGQfQZBHkZbUq93ehrNhM0DsGdF/XUFTXftrHxeHn7nXlOgBdFBIIPiJze tOKX11dvyZ2NLoR89Sne5BiYVvCCvlzgEKa+PvBxv33eFE9fW9BR/GUqZeAfpRR80luQ Xxc745KqcuWDExHf2nbPGVAvX8PwN9Q1bfED+JsoX1Y/7GFYvHMTd095wbqzpE5fdM/t yKOMb8jL4cwhh67vfb4OD+GXVzdG8XX+E5IBEsBP7dcMsZALgZvU8N46daEyRuc2D16t 6M2Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=XbCzsRm+DsV5Yt6HktORH65Mj9RdGc6UQQJu7FyWb+Y=; b=ARsPygnzuHBE/cuZBKFO3PaigZtK3IYEB5pJ4sTHJHXi6seHSfKI8C1Y/+aTx1p2kQ Y2+NOo7loTX2tsoVdI4tw0aYykoLrLbozoHx6+UfdbPia4q6ruagDVjUQp8DGjX2r790 s79vtzNNnR26EXf9rK6ol+ZJAZ8rzsJ4YTCktFfNMuA16pJGLLg7SofUhJRhl/7tadil 97kNXmA/rWH0D/oSlapEPZA0jfDl0T6iX1rLGqfrh3WZT5j9FiRqq0RQTlOsrOz0OPrc xiYu9A+JpKnAn8v7xOkoVm9Hg1yF7PZN7fHu7/bfXyf5YX4+haDthgNWZ4SIvWnchjus ZZfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VFbhABGj; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u90si4579918pfj.304.2018.04.04.12.05.48; Wed, 04 Apr 2018 12:06:07 -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=@ti.com header.s=ti-com-17Q1 header.b=VFbhABGj; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751516AbeDDTEf (ORCPT + 99 others); Wed, 4 Apr 2018 15:04:35 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:58270 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeDDTEd (ORCPT ); Wed, 4 Apr 2018 15:04:33 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w34J4NKB013952; Wed, 4 Apr 2018 14:04:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522868663; bh=9OSTu0U9y8UUe+GV2RItouISD4RjSBWqQvSBAXcHZnI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=VFbhABGjstcAs6L+muDF2IMHNSzVgAYml8tB7/5PWp3WUTxCh1ulr8vG50D+r/Iab 9mTHS+2fofPsgFfHY++dJb1zLmhnofFSxjrpo6rZvLJe5WypAdVFGppbp3roRWrGxA 8totgJi5/oQQbn2g9Gd2WPCcn1ScRENCnji4M62I= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w34J4N0e004558; Wed, 4 Apr 2018 14:04:23 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 4 Apr 2018 14:04:23 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 4 Apr 2018 14:04:23 -0500 Received: from [172.22.64.230] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w34J4MJJ005140; Wed, 4 Apr 2018 14:04:22 -0500 Subject: Re: [PATCHv4 06/10] mfd: ti-lmu: add PWM support To: Sebastian Reichel , Sebastian Reichel , Lee Jones , Daniel Thompson , Rob Herring , Tony Lindgren CC: Jingoo Han , Mark Rutland , , , , References: <20180330172414.26575-1-sebastian.reichel@collabora.co.uk> <20180330172414.26575-7-sebastian.reichel@collabora.co.uk> From: Dan Murphy Message-ID: Date: Wed, 4 Apr 2018 14:04:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180330172414.26575-7-sebastian.reichel@collabora.co.uk> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sebastian -Milo 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. > > Signed-off-by: Sebastian Reichel > --- > drivers/mfd/ti-lmu.c | 11 +++++++++++ > include/linux/mfd/ti-lmu.h | 3 +++ > 2 files changed, 14 insertions(+) > > 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, const struct i2c_device_id *id) > return ret; > } > > + lmu->pwm = devm_pwm_get(dev, "lmu-backlight"); 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 Dan > + if (IS_ERR(lmu->pwm)) { > + ret = PTR_ERR(lmu->pwm); > + if (ret != -EINVAL) { > + dev_err(dev, "Failed to get PWM: %d\n", ret); > + return ret; > + } > + > + lmu->pwm = NULL; > + } > + > ret = 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 > > /* 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 > -- ------------------ Dan Murphy