Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1346839lqh; Mon, 6 May 2024 05:17:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVa3zKJWSbM/L6D4kCslXCtqpZ0MBN53BnRTD2XGkCPUwsX6kuK+4pUT5UsD+Fkr+rrpx/CWnypaGZywHsdYrBTPBEd9nvL8Zqs2Uzr2g== X-Google-Smtp-Source: AGHT+IH4Hb2fheObZ7Zlk8fjTKzfkcq4zD1zF/XRmqE74tHt+HNuI9Kbiu62zHoHTN/3MP4/Z5wS X-Received: by 2002:a05:6a20:438e:b0:1aa:5fb4:87ff with SMTP id i14-20020a056a20438e00b001aa5fb487ffmr11372849pzl.14.1714997822453; Mon, 06 May 2024 05:17:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714997822; cv=pass; d=google.com; s=arc-20160816; b=Pl0OkQtqRZXcu9QnySCnJNknAG3jadza5n2bWurXvcNfRJ3NssmAsVMwhrrV+2FyAT jcMnkF1E1T0cBXln/F6OCMmnBVOF3L7mayo3aKXOB4mfGEZ6290PZtjI4ktV2iJ6ngCa Xi9UelFHbnm/DDprZjxC0PsNtwJD8o0k62/5b8HM4GWhMcqzBnCzBLn5K6pHqwHy3MwR 0mzoPF5MiBiHZyXNCKspjPfMFW2G+bOD54trc0eJtXdxYx5CxaIbJKTQZFmPzOaE8rwg aHaX4DGOm/K3p2qHWh9JZCkoXkQpFVbSjza142JmELa9nQcqLIvI5qFG47u3+i+EMBkU PJag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=GghDAbxJTiFXPmd0O9RSq4Gscox+MQcblLmbcp6zJ2Y=; fh=QGhnzj+V9mkvG1qY9PN9H5qbZ6CEV9j4oWAFJOAQvZ0=; b=iBHkLb8ConJnvp15LV0v3EZs0jhNwuGQJFf1+afbZqibcG5oCN/YaakrRsrRjM2Dam L6RqPXHNiIaE0JiFmlWUftlnoxWJGfm2KpSAY6ygExmHEQ6jb0HFBU225KZAEIbsN3+K 66mBJIJTMUhULV7NxIGFgoNGkU6l0SsnARO9kUU2RJfZFATElLNqhTlqHCG46DDKXByZ eCukcczH9AH49hnYPOYmWd7VcuGBzmHdHHZ6uBuOvitOk1C2+S2i4rRBv8RTVq5w4dfa zscP7bABHhgOGI8cLuZ1M50rnqzirJ5JfYpJnbsXT3ee4hx/JjBuYD+IrPlWP40LK3a+ Jexw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XG/A/0RP"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c3-20020aa78e03000000b006f45502d938si5134031pfr.329.2024.05.06.05.17.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 05:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XG/A/0RP"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A4F85B23ABE for ; Mon, 6 May 2024 12:13:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D36814389B; Mon, 6 May 2024 12:13:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XG/A/0RP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40DCC143C52 for ; Mon, 6 May 2024 12:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714997588; cv=none; b=Pz4mbmMqqy27jnP0UsWKOtiNkT06GNHujjpVER3VLUPGZq+8cuWiLZ1VSGfrLijdUmyJiSrOYqpjBlZj4iA0Wej26OI7EZO6IkvLY+Eni9bJ9MqMXgxq7ZyAIR/EbyFDqvXGrfnjJ/LauOHrjdTxbla6YKBb/wDQtp1zb8KRRtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714997588; c=relaxed/simple; bh=SJorlvBhI60itC7iiQx26RslvUGaX59HbR2ZqMGANGk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FHcfme9mPMGmY+0wnlSMgSkdSgLwvc1gpFdSfN/gCZcQ/0tW1EWLg3Oo0sb2eszKVU5r/54VrHNqxKmSR6UmYRmTgK4yO21vtJtbW6jZkrN5xwzKgI4X+KYwjfKTtLdOlHLh/YmLhvUbpnBFXwa8rE4UKwXSDqfPakLHqZj1btU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XG/A/0RP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFD30C4DDE6 for ; Mon, 6 May 2024 12:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714997587; bh=SJorlvBhI60itC7iiQx26RslvUGaX59HbR2ZqMGANGk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XG/A/0RPtmpxF8KzxNDsBqtVTipjfffh68vuGTv4CF1NkIzQcAl66ev7nIH4aEVEb g1v+inLWVqSwUyx7srz68yAnEiqj5LmAuMewDtjCYc2D6a5wK6R132ZZOOnYt75d9L VglcF7MA6E7+inXJ17Fv/GC9aNZFi54ENR1FixCPQVmJ6iCYksGkmPUeKyhJrnm8Mj AZWCJCQxfW3epDHCFWqVjOj4Jsu0Y6JxpHjSFHSysdU1gP0pcDv3bNcCWtTEYPDEn4 918uJoFaEWrnGkCQrFejpsj1IMRE50xLkTo74zErAl6kfVr7S2Q85YP0Ud7F9GLi0u RnfF1iFh/v9QQ== Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-dc6dcd9124bso1519198276.1 for ; Mon, 06 May 2024 05:13:07 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWGlXLFxXNwOlIJpGCs1QFF32s/5eJODmH49SAjZJYJEziQYus0kwVQKfcLo9Iay59NAwKiyZ52pK/7KHgQxVctPBhkLATy12DYzvAN X-Gm-Message-State: AOJu0YzLWCb/r29NA5bS7tEv7uHRYspKeNblyjkgNDsCulNvFXtA+89z wa6rV2GXOjZ3XcTj9Sak9ksFMnYLaj5nNBqnqPyUQIwv1Jnif9UDcNAgr5W05gFhV0VK9L2enGz YsKCD+MqJ2lOpNvdgYvfQfp+DwJTRcK4NxxWakQ== X-Received: by 2002:a05:6902:1b01:b0:ddd:7456:d203 with SMTP id eh1-20020a0569021b0100b00ddd7456d203mr11606197ybb.41.1714997586640; Mon, 06 May 2024 05:13:06 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240502-anx-tdm-v1-0-894a9f634f44@chromium.org> <20240502-anx-tdm-v1-2-894a9f634f44@chromium.org> In-Reply-To: <20240502-anx-tdm-v1-2-894a9f634f44@chromium.org> From: Robert Foss Date: Mon, 6 May 2024 14:12:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] drm/bridge: anx7625: Change TDM setting accroding to dt property To: Hsin-Te Yuan Cc: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Xin Ji , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 2, 2024 at 11:03=E2=80=AFAM Hsin-Te Yuan 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 > --- > 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 =3D 1; > > + if(!of_property_read_bool(np, "no-shift-audio-data")) > + pdata->shift_audio_data =3D 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 |=3D 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 > >