Re: [PATCH v6 14/48] mfd: ti_am335x_tscadc: Don't search the tree for our clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miquel,
I recently found that our BeagleBoneBlack with external touch screen stopped
to find it.

A git bisect revealed this patch (merged into v5.16-rc1) as the first bad:

> Am 15.10.2021 um 10:14 schrieb Miquel Raynal <miquel.raynal@xxxxxxxxxxx>:
> 
> There is a single clock available in our node, which is named
> "fck". The clock handler then points to adc_tsc_fck but no need to point
> directly to it and do a full tree search.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
> drivers/mfd/ti_am335x_tscadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
> index e2c4416f192d..8af44c08d925 100644
> --- a/drivers/mfd/ti_am335x_tscadc.c
> +++ b/drivers/mfd/ti_am335x_tscadc.c
> @@ -206,7 +206,7 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
> 	 * This frequency is valid since TSC_ADC_SS controller design
> 	 * assumes the OCP clock is at least 6x faster than the ADC clock.
> 	 */
> -	clk = devm_clk_get(&pdev->dev, "adc_tsc_fck");
> +	clk = devm_clk_get(&pdev->dev, NULL);
> 	if (IS_ERR(clk)) {
> 		dev_err(&pdev->dev, "failed to get TSC fck\n");
> 		err = PTR_ERR(clk);
> -- 
> 2.27.0
> 

While I understand the reasons for this change there seems to be something
missing now in the device tree because the clock isn't found any more.

After knowing about the problem I could also locate the log entry:

[    4.456680] ti_am3359-tscadc 44e0d000.tscadc: failed to get TSC fck

Reverting your patch makes it work again.

Is there missing a change in the am335x-boneblack or am335x DTS?

Our (private) DTS looks like this, i.e. we don't play with clocks inherited
from mainline tree:

#include "am335x-boneblack.dts"

...

&tscadc {
        status = "okay";

        tsc {
                ti,wires = <4>;
                ti,x-plate-resistance = <600>;
                ti,coordinate-readouts = <5>;
                ti,wire-config = <0x00 0x11 0x22 0x33>;
        };

        adc {
                ti,adc-channels = <4 5 6 7>;
        };
};

BR and thanks,
Nikolaus



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux