dri-devel Archive mirror
 help / color / mirror / Atom feed
From: Robert Foss <rfoss@kernel.org>
To: Hsin-Te Yuan <yuanhsinte@chromium.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	 Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@gmail.com>,
	 Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Xin Ji <xji@analogixsemi.com>,
	dri-devel@lists.freedesktop.org,  devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/bridge: anx7625: Change TDM setting accroding to dt property
Date: Mon, 6 May 2024 14:12:55 +0200	[thread overview]
Message-ID: <CAN6tsi79jNhCybjyX3aQjXAP_J6MpjuCBL5q2aFrgjENPt60kA@mail.gmail.com> (raw)
In-Reply-To: <20240502-anx-tdm-v1-2-894a9f634f44@chromium.org>

On Thu, May 2, 2024 at 11:03 AM Hsin-Te Yuan <yuanhsinte@chromium.org> wrote:
>
> For some SoCs, the TDM setting is not to shift the first audio data bit,
> which is not the default setting of anx7625. In such cases, the TDM
> setting should be changed according to the device tree property.
>
> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++
>  drivers/gpu/drm/bridge/analogix/anx7625.h | 1 +
>  2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 29d91493b101a..538edddf313c9 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1709,6 +1709,9 @@ static int anx7625_parse_dt(struct device *dev,
>         if (of_property_read_bool(np, "analogix,audio-enable"))
>                 pdata->audio_en = 1;
>
> +       if(!of_property_read_bool(np, "no-shift-audio-data"))
> +               pdata->shift_audio_data = 1;

checkpatch --strict reports this:

ERROR: space required before the open parenthesis '('
#27: FILE: drivers/gpu/drm/bridge/analogix/anx7625.c:1712:
+    if(!of_property_read_bool(np, "no-shift-audio-data"))


> +
>         return 0;
>  }
>
> @@ -1866,6 +1869,11 @@ static int anx7625_audio_hw_params(struct device *dev, void *data,
>                                            ~TDM_SLAVE_MODE,
>                                            I2S_SLAVE_MODE);
>
> +       if (!ctx->pdata.shift_audio_data)
> +               ret |= anx7625_write_or(ctx, ctx->i2c.tx_p2_client,
> +                                      AUDIO_CONTROL_REGISTER,
> +                                      TDM_TIMING_MODE);
> +
>         /* Word length */
>         switch (params->sample_width) {
>         case 16:
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.h b/drivers/gpu/drm/bridge/analogix/anx7625.h
> index 39ed35d338363..41b395725913a 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.h
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.h
> @@ -441,6 +441,7 @@ struct anx7625_platform_data {
>         u8 lane1_reg_data[DP_TX_SWING_REG_CNT];
>         u32 low_power_mode;
>         struct device_node *mipi_host_node;
> +       int shift_audio_data;
>  };
>
>  struct anx7625_i2c_client {
>
> --
> 2.45.0.rc1.225.g2a3ae87e7f-goog
>
>

  reply	other threads:[~2024-05-06 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02  9:03 [PATCH 0/2] Add TDM setting support Hsin-Te Yuan
2024-05-02  9:03 ` [PATCH 1/2] dt-bindings: drm/bridge: anx7625: Add a perporty to change TDM setting Hsin-Te Yuan
2024-05-02 14:47   ` Conor Dooley
2024-05-03  6:58     ` Hsin-Te Yuan
2024-05-03 16:45       ` Conor Dooley
2024-05-03 17:12         ` Hsin-Te Yuan
2024-05-02  9:03 ` [PATCH 2/2] drm/bridge: anx7625: Change TDM setting accroding to dt property Hsin-Te Yuan
2024-05-06 12:12   ` Robert Foss [this message]
2024-05-02  9:33 ` [PATCH 0/2] Add TDM setting support Chen-Yu Tsai

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=CAN6tsi79jNhCybjyX3aQjXAP_J6MpjuCBL5q2aFrgjENPt60kA@mail.gmail.com \
    --to=rfoss@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=xji@analogixsemi.com \
    --cc=yuanhsinte@chromium.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 read-only IMAP folder(s) and NNTP newsgroup(s).