All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Valerio Setti <vsetti@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] ASoC: meson: add audin main module and I2S formatter
Date: Mon, 14 Sep 2026 17:45:43 +0200	[thread overview]
Message-ID: <f2186082-8799-4eb6-8e0e-2b2036578661@kernel.org> (raw)
In-Reply-To: <964d6626-202c-4d0a-aef2-86a383f405ab@baylibre.com>

On 14/09/2026 15:14, Valerio Setti wrote:
> Thanks for your review and feedbacks.
> 
> 
> On 9/13/26 11:41 AM, Krzysztof Kozlowski wrote:
>> On Sat, Sep 12, 2026 at 12:14:32AM +0200, Valerio Setti wrote:
>>> +static int meson_gx_audin_probe(struct platform_device *pdev)
>>> +{
>>> +	struct device *dev = &pdev->dev;
>>> +	struct resource *res;
>>> +	void __iomem *mmio;
>>> +	struct regmap *regmap;
>>> +	struct clk *clk;
>>> +	int ret;
>>> +
>>> +	ret = device_reset(dev);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret, "Failed to reset device\n");
>>> +
>>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> +	if (!res)
>>> +		return dev_err_probe(dev, -EINVAL, "Failed to get memory resource\n");
>>> +
>>> +	/*
>>> +	 * Do not use devm_platform_ioremap_resource() here: it would claim the
>>> +	 * whole AUDIN window exclusively and the FIFO children would then fail
>>> +	 * to request their own sub-ranges.
>>> +	 */
>>
>> And this should point you that child is not a separate device.
>>
>> Please open your datasheet and read what is the address space of this
>> device. You claim here ENTIRE address space. If you insist that entire
>> address space is not owned by this device, then you misrepresented
>> hardware in the DT anyway.
> 
> As I mentioned in the cover letter I designed it this way so that I 
> could easily re-use the same driver code for all 3 FIFOs just offsetting 
> the base address. I knew it was a bit hackish a solution, but IMO that 
> was worth it since it was simplifying a bit driver's code. Perhaps it 
> was more software-oriented rather than hardware related.
> The other possible approach is to fully copy what AIU is doing and 
> allocate each FIFO as a DAI. I'll follow that design then, but if you 
> have any better idea please let me know.

Do not design hardware description - so DTS - to facilitate your driver
design. Specifically requested by writing bindings.


Best regards,
Krzysztof

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Valerio Setti <vsetti@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] ASoC: meson: add audin main module and I2S formatter
Date: Mon, 14 Sep 2026 17:45:43 +0200	[thread overview]
Message-ID: <f2186082-8799-4eb6-8e0e-2b2036578661@kernel.org> (raw)
In-Reply-To: <964d6626-202c-4d0a-aef2-86a383f405ab@baylibre.com>

On 14/09/2026 15:14, Valerio Setti wrote:
> Thanks for your review and feedbacks.
> 
> 
> On 9/13/26 11:41 AM, Krzysztof Kozlowski wrote:
>> On Sat, Sep 12, 2026 at 12:14:32AM +0200, Valerio Setti wrote:
>>> +static int meson_gx_audin_probe(struct platform_device *pdev)
>>> +{
>>> +	struct device *dev = &pdev->dev;
>>> +	struct resource *res;
>>> +	void __iomem *mmio;
>>> +	struct regmap *regmap;
>>> +	struct clk *clk;
>>> +	int ret;
>>> +
>>> +	ret = device_reset(dev);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret, "Failed to reset device\n");
>>> +
>>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> +	if (!res)
>>> +		return dev_err_probe(dev, -EINVAL, "Failed to get memory resource\n");
>>> +
>>> +	/*
>>> +	 * Do not use devm_platform_ioremap_resource() here: it would claim the
>>> +	 * whole AUDIN window exclusively and the FIFO children would then fail
>>> +	 * to request their own sub-ranges.
>>> +	 */
>>
>> And this should point you that child is not a separate device.
>>
>> Please open your datasheet and read what is the address space of this
>> device. You claim here ENTIRE address space. If you insist that entire
>> address space is not owned by this device, then you misrepresented
>> hardware in the DT anyway.
> 
> As I mentioned in the cover letter I designed it this way so that I 
> could easily re-use the same driver code for all 3 FIFOs just offsetting 
> the base address. I knew it was a bit hackish a solution, but IMO that 
> was worth it since it was simplifying a bit driver's code. Perhaps it 
> was more software-oriented rather than hardware related.
> The other possible approach is to fully copy what AIU is doing and 
> allocate each FIFO as a DAI. I'll follow that design then, but if you 
> have any better idea please let me know.

Do not design hardware description - so DTS - to facilitate your driver
design. Specifically requested by writing bindings.


Best regards,
Krzysztof


  reply	other threads:[~2026-09-14 15:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 22:14 [PATCH 0/6] ASoC: meson: gx: add base support for I2S audio input Valerio Setti
2026-09-11 22:14 ` Valerio Setti
2026-09-11 22:14 ` [PATCH 1/6] dt-bindings: sound: amlogic: add schemas for audin components Valerio Setti
2026-09-11 22:14   ` Valerio Setti
2026-09-13  9:38   ` Krzysztof Kozlowski
2026-09-13  9:38     ` Krzysztof Kozlowski
2026-09-11 22:14 ` [PATCH 2/6] ASoC: meson: add audin main module and I2S formatter Valerio Setti
2026-09-11 22:14   ` Valerio Setti
2026-09-13  9:41   ` Krzysztof Kozlowski
2026-09-13  9:41     ` Krzysztof Kozlowski
2026-09-14 13:14     ` Valerio Setti
2026-09-14 13:14       ` Valerio Setti
2026-09-14 15:45       ` Krzysztof Kozlowski [this message]
2026-09-14 15:45         ` Krzysztof Kozlowski
2026-09-14  7:33   ` Uwe Kleine-König
2026-09-14  7:33     ` Uwe Kleine-König
2026-09-11 22:14 ` [PATCH 3/6] ASoC: meson: add audin FIFO driver Valerio Setti
2026-09-11 22:14   ` Valerio Setti
2026-09-11 22:30   ` sashiko-bot
2026-09-11 22:30     ` sashiko-bot
2026-09-11 22:14 ` [PATCH 4/6] ASoC: meson: aiu: add I2S Capture DAI Valerio Setti
2026-09-11 22:14   ` Valerio Setti
2026-09-11 22:14 ` [PATCH 5/6] ASoC: meson: gx-card: add support for audin FIFO Valerio Setti
2026-09-11 22:14   ` Valerio Setti
2026-09-11 22:14 ` [PATCH 6/6] arm64: dts: amlogic: gx: add nodes for audin and its FIFOs Valerio Setti
2026-09-11 22:14   ` Valerio Setti

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=f2186082-8799-4eb6-8e0e-2b2036578661@kernel.org \
    --to=krzk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --cc=vsetti@baylibre.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.