From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Cc: Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 3/3] soc: samsung: usi: implement support for USIv1
Date: Sat, 4 Jan 2025 11:35:12 +0100 [thread overview]
Message-ID: <fc357064-b385-428a-8206-0f994a76e1ad@kernel.org> (raw)
In-Reply-To: <9510ba3c-1879-4c42-ae17-36d8b32fc799@gmail.com>
On 04/01/2025 10:36, Ivaylo Ivanov wrote:
>>> struct exynos_usi_variant {
>>> @@ -66,6 +79,16 @@ struct exynos_usi_mode {
>>> unsigned int val; /* mode register value */
>>> };
>>>
>>> +static const struct exynos_usi_mode exynos_usi_v1_modes[] = {
>>> + [USI_V1_NONE] = { .name = "none", .val = USI_V1_SW_CONF_NONE },
>>> + [USI_V1_I2C0] = { .name = "i2c0", .val = USI_V1_SW_CONF_I2C0 },
>>> + [USI_V1_I2C1] = { .name = "i2c1", .val = USI_V1_SW_CONF_I2C1 },
>>> + [USI_V1_I2C0_1] = { .name = "i2c0_1", .val = USI_V1_SW_CONF_I2C0_1 },
>>> + [USI_V1_SPI] = { .name = "spi", .val = USI_V1_SW_CONF_SPI },
>>> + [USI_V1_UART] = { .name = "uart", .val = USI_V1_SW_CONF_UART },
>>> + [USI_V1_UART_I2C1] = { .name = "uart_i2c1", .val = USI_V1_SW_CONF_UART_I2C1 },
>> Now I see why you duplicated the IDs... With my approach your code here
>> is even simpler. Allows to drop USI_VER1 as well.
>
> We can't really drop USI_VER1, as we'll fall into USIV2-specific code, like so:
> if (usi->data->ver == USI_VER2) return exynos_usi_enable(usi);
Yeah, indeed. You still would have just one exynos_usi_mode table.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-01-04 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 20:40 [PATCH v1 0/3] " Ivaylo Ivanov
2025-01-02 20:40 ` [PATCH v1 1/3] dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos8895 Ivaylo Ivanov
2025-01-03 8:16 ` Krzysztof Kozlowski
2025-01-02 20:40 ` [PATCH v1 2/3] dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi Ivaylo Ivanov
2025-01-03 8:21 ` Krzysztof Kozlowski
2025-01-04 9:33 ` Ivaylo Ivanov
2025-01-02 20:40 ` [PATCH v1 3/3] soc: samsung: usi: implement support for USIv1 Ivaylo Ivanov
2025-01-03 8:29 ` Krzysztof Kozlowski
2025-01-04 9:36 ` Ivaylo Ivanov
2025-01-04 10:35 ` Krzysztof Kozlowski [this message]
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=fc357064-b385-428a-8206-0f994a76e1ad@kernel.org \
--to=krzk@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ivo.ivanov.ivanov1@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=semen.protsenko@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®