Re: [PATCH v2] firmware: vpd: Add an interface to read VPD value
From: Cheng-yi Chiang
Date: Tue Oct 08 2019 - 08:10:51 EST
On Tue, Oct 8, 2019 at 8:06 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Oct 08, 2019 at 06:11:44PM +0800, Cheng-Yi Chiang wrote:
> > Add an interface for other driver to query VPD value.
> > This will be used for ASoC machine driver to query calibration
> > data stored in VPD for smart amplifier speaker resistor
> > calibration.
> >
> > The example usage in ASoC machine driver is like:
> >
> > #define DSM_CALIB_KEY "dsm_calib"
> > static int load_calibration_data(struct cml_card_private *ctx) {
> > char *data = NULL;
> > int ret;
> > u32 value_len;
> >
> > /* Read calibration data from VPD. */
> > ret = vpd_attribute_read(1, DSM_CALIB_KEY,
> > (u8 **)&data, &value_len);
> >
> > /* Parsing of this string...*/
> > }
> >
> >
> > Signed-off-by: Cheng-Yi Chiang <cychiang@xxxxxxxxxxxx>
> > ---
>
> I can't take this patch without a real user of this function in the
> kernel tree at the same time. Please submit it as part of a patch
> series with that change as well.
>
Hi Greg,
I see.
There is an ongoing discussion with Mark in
https://patchwork.kernel.org/patch/11179237/
I will resend this after machine driver is merged, and after codec
driver change get sorted out there.
Thanks!
> thanks,
>
> greg k-h