dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: andy.gross@linaro.org, linux-arm-msm@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/4] drm/bridge: adv7511: Initialize regulators
Date: Mon, 26 Sep 2016 12:10:17 +0530	[thread overview]
Message-ID: <57E8C2D1.7020307@codeaurora.org> (raw)
In-Reply-To: <4886299.nxciUJeXYk@avalon>



On 9/25/2016 11:05 PM, Laurent Pinchart wrote:
> Hi Archit,
>
> Thank you for the patch.
>
> On Friday 23 Sep 2016 14:50:28 Archit Taneja wrote:
>> Maintain a table of regulator names expect by ADV7511 and ADV7533.
>> Use regulator_bulk_* api to configure these.
>>
>> Initialize and enable the regulators during probe itself. Controlling
>> these dynamically is left for later.
>>
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Signed-off-by: Archit Taneja <architt@codeaurora.org>
>> ---
>> v2:
>> - Use regulator_bulk_* API to configure regulators as suggested by Laurent.
>> - Set up regulators for ADV7511 too.
>>
>>   drivers/gpu/drm/bridge/adv7511/adv7511.h     |  4 ++
>>   drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 85 ++++++++++++++++++++++---
>>   2 files changed, 80 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
>> b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 161c923..83ebdaa 100644
>> --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
>> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
>> @@ -12,6 +12,7 @@
>>   #include <linux/hdmi.h>
>>   #include <linux/i2c.h>
>>   #include <linux/regmap.h>
>> +#include <linux/regulator/consumer.h>
>>
>>   #include <drm/drm_crtc_helper.h>
>>   #include <drm/drm_mipi_dsi.h>
>> @@ -327,6 +328,9 @@ struct adv7511 {
>>
>>   	struct gpio_desc *gpio_pd;
>>
>> +	struct regulator_bulk_data *supplies;
>> +	int num_supplies;
>
> num_supplies is always positive, you can make it an unsigned int.
>
>> +
>>   	/* ADV7533 DSI RX related params */
>>   	struct device_node *host_node;
>>   	struct mipi_dsi_device *dsi;
>> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
>> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 8ed3906..f7e79ed
>> 100644
>> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
>> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
>> @@ -839,6 +839,57 @@ static struct drm_bridge_funcs adv7511_bridge_funcs = {
>> * Probe & remove
>>    */
>>
>> +static const char * const adv7511_supply_names[] = {
>> +	"avdd",
>> +	"dvdd",
>> +	"pvdd",
>> +	"v3p3",
>> +	"bgvdd",
>> +};
>> +
>> +static const char * const adv7533_supply_names[] = {
>> +	"avdd",
>> +	"dvdd",
>> +	"pvdd",
>> +	"a2vdd",
>> +	"v3p3",
>> +	"v1p2",
>> +};
>> +
>> +static int adv7511_init_regulators(struct adv7511 *adv)
>> +{
>> +	struct device *dev = &adv->i2c_main->dev;
>> +	const char * const *supply_names;
>> +	int i, ret;
>
> i only takes positive values, you can make it an unsigned int.
>
> Apart from that,
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I'll fix these. Thanks for the review.

Archit

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-26  6:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1472640730-24326-1-git-send-email-architt@codeaurora.org>
2016-08-31 10:52 ` [PATCH 2/3] drm/bridge: adv7533: Initialize regulators Archit Taneja
2016-08-31 15:53   ` Laurent Pinchart
2016-08-31 16:54     ` Archit Taneja
2016-08-31 20:30       ` Laurent Pinchart
2016-09-01 10:09         ` Archit Taneja
     [not found] ` <1474622430-6704-1-git-send-email-architt@codeaurora.org>
2016-09-23  9:20   ` [PATCH v2 2/4] drm/bridge: adv7511: " Archit Taneja
2016-09-25 17:35     ` Laurent Pinchart
2016-09-26  6:40       ` Archit Taneja [this message]
2016-11-29  6:07   ` [PATCH v3 0/2] drm/bridge: adv7511: Enable regulators Archit Taneja
     [not found]     ` <1480399662-8858-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-11-29  6:07       ` [PATCH v3 1/2] dt-bindings: drm/bridge: adv7511: Add regulator bindings Archit Taneja
     [not found]         ` <1480399662-8858-2-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-11-29  6:33           ` Laurent Pinchart
2016-11-29  8:11             ` Archit Taneja
2016-11-29  9:11               ` Laurent Pinchart
2016-11-29 11:01                 ` Mark Brown
2016-11-29 19:37                   ` Laurent Pinchart
2016-11-30 16:14                     ` Mark Brown
2016-12-05 21:11                 ` Bjorn Andersson
2016-12-05 21:16                   ` Laurent Pinchart
2016-12-06 10:05                     ` Mark Brown
2016-12-06 12:46                       ` Laurent Pinchart
2016-12-06 13:20                         ` Mark Brown
2016-12-06 16:08                           ` Laurent Pinchart
2016-12-06 16:11                             ` Mark Brown
2016-11-29  6:07     ` [PATCH v3 2/2] drm/bridge: adv7511: Initialize regulators Archit Taneja
2016-11-29  6:28       ` Laurent Pinchart
2016-12-05  7:53     ` [PATCH v4 0/2] drm/bridge: adv7511: Enable regulators Archit Taneja
2016-12-05  7:53       ` [PATCH v4 1/2] dt-bindings: drm/bridge: adv7511: Add regulator bindings Archit Taneja
2016-12-09 22:11         ` Rob Herring
2016-12-18 11:17           ` Archit Taneja
2016-12-05  7:53       ` [PATCH v4 2/2] drm/bridge: adv7511: Initialize regulators Archit Taneja
2017-01-11  6:52       ` [PATCH v5 0/2] drm/bridge: adv7511: Enable regulators Archit Taneja
2017-01-11  6:52         ` [PATCH v5 1/2] dt-bindings: drm/bridge: adv7511: Add regulator bindings Archit Taneja
2017-01-11  6:52         ` [PATCH v5 2/2] drm/bridge: adv7511: Initialize regulators Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57E8C2D1.7020307@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).