Re: [PATCH v2 3/3] ASoC: mediatek: mt8188-mt6359: Add accdet headset jack detect support

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

 



On Wed, Mar 05, 2025 at 05:23:29PM +0000, Mark Brown wrote:
> On Wed, Mar 05, 2025 at 06:18:41PM +0100, AngeloGioacchino Del Regno wrote:
> 
> > Get to that mt6359-accdet.h header and:
> 
> > #if IS_ENABLED(CONFIG_SND_SOC_MT6359_ACCDET)
> 
> > function signatures
> 
> > #else
> 
> > static .... { return -EINVAL; (or whatever else) }
> 
> > #endif
> > 
> 
> It should probably be return 0 for the registration/unregistration
> functions so the caller doesn't fail if it checks the return code when
> the accessory detection is configured out.

Actually, given this function will only be called on platforms where the
accessory detection is present, I agree with Angelo that we should return an
error (and print the error message), so the user can easily figure out that the
accdet initialization failed due to the missing config.

Thanks,
Nícolas




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux