mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Robert Foss <robert.foss@linaro.org>
Cc: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	a.hajda@samsung.com, narmstrong@baylibre.com,
	laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
	jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, kernel@collabora.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] drm/bridge: parade-ps8640: Move real poweroff action to new function
Date: Fri, 19 Nov 2021 16:08:10 +0100	[thread overview]
Message-ID: <7d6674a2-5f73-3c42-c832-0c85e0462093@collabora.com> (raw)
In-Reply-To: <CAG3jFyvF7JAm8X42+f2u+ycqdsHLfNH2YebxYSjJJSBdAbc1aw@mail.gmail.com>

Il 19/11/21 14:19, Robert Foss ha scritto:
> Hey Angelo,
> 
> On Wed, 10 Nov 2021 at 13:46, AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Il 10/11/21 13:44, Dafna Hirschfeld ha scritto:
>>>
>>>
>>> On 02.11.21 11:36, AngeloGioacchino Del Regno wrote:
>>>> In preparation for varying the poweron error handling in function
>>>> ps8640_bridge_poweron(), move function ps8640_bridge_poweroff() up
>>>> and also move the actual logic to power off the chip to a new
>>>> __ps8640_bridge_poweroff() function.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>> ---
>>>>    drivers/gpu/drm/bridge/parade-ps8640.c | 37 ++++++++++++++------------
>>>>    1 file changed, 20 insertions(+), 17 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c
>>>> b/drivers/gpu/drm/bridge/parade-ps8640.c
>>>> index 8c5402947b3c..41f5d511d516 100644
>>>> --- a/drivers/gpu/drm/bridge/parade-ps8640.c
>>>> +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
>>>> @@ -293,6 +293,26 @@ static int ps8640_bridge_vdo_control(struct ps8640 *ps_bridge,
>>>>        return 0;
>>>>    }
>>>> +static void __ps8640_bridge_poweroff(struct ps8640 *ps_bridge)
>>>> +{
>>>> +    gpiod_set_value(ps_bridge->gpio_reset, 1);
>>>> +    gpiod_set_value(ps_bridge->gpio_powerdown, 1);
>>>> +    if (regulator_bulk_disable(ARRAY_SIZE(ps_bridge->supplies),
>>>> +                   ps_bridge->supplies)) {
>>>> +        DRM_ERROR("cannot disable regulators\n");
>>>> +    }
>>>
>>> That '{' is redundant
>>>
>>> Thanks,
>>> Danfa
>>>
>>
>> Hi Dafna,
>> the braces were added as a way to increase human readability.
> 
> Not to bikeshed this, but the kernel style guide is clear about this.
> No unneeded braces should be used where a single statement will do.
> 

Hey Robert!

That's right, style rules come before personal preferences.
I'll send a v3 without the braces as soon as possible!

Cheers,
- Angelo

  reply	other threads:[~2021-11-19 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02  9:36 [PATCH v2 1/3] drm/bridge: parade-ps8640: Don't try to enable VDO if poweron fails AngeloGioacchino Del Regno
2021-11-02  9:36 ` [PATCH v2 2/3] drm/bridge: parade-ps8640: Move real poweroff action to new function AngeloGioacchino Del Regno
2021-11-10 12:44   ` Dafna Hirschfeld
2021-11-10 12:46     ` AngeloGioacchino Del Regno
2021-11-19 13:19       ` Robert Foss
2021-11-19 15:08         ` AngeloGioacchino Del Regno [this message]
2021-11-02  9:36 ` [PATCH v2 3/3] drm/bridge: parade-ps8640: Perform full poweroff if poweron fails AngeloGioacchino Del Regno
2021-11-10 12:48   ` Dafna Hirschfeld
2021-11-10 12:42 ` [PATCH v2 1/3] drm/bridge: parade-ps8640: Don't try to enable VDO " Dafna Hirschfeld

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=7d6674a2-5f73-3c42-c832-0c85e0462093@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.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

all inboxes | Powered by JetHome®