Re: [PATCH v3 12/15] iio: adc: qcom-spmi-adc5: convert to device properties

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

 



On 2023-01-17 11:40:42, Andy Shevchenko wrote:
<snip>
> > > > This CC just surfaced in my inbox while searching for our current
> > > > discussion around missing labels in qcom-spmi-vadc - and on the side a
> > > > userspace @xx label name ABI break (in qcom-spmi-adc5) caused by this
> > > > patch's fwnode_get_name change - we could've caught it if I had not
> > > > accidentally marked it as read and/or forgot about it.  My apologies.
> > >
> > > Does the following addition to the top of the
> > > adc5_get_fw_channel_data() fix the issue?
> > >
> > > +       name = devm_kasprintf(adc->dev, GFP_KERNEL, "%pfwP", fwnode);
> > > +       if (!name)
> > > +               return -ENOMEM;
> >
> > Okay, it probably the same, so it might need additional code to
> >
> > + name[strchrnul(name, '@') - name] = '\0';
> 
> I have just sent a formal patch, please test on top of non-working kernel.

I would've preferred to fix this in the same way as qcom-spmi-vadc by
implementing read_label instead and basing it on the DT label or driver
string literals instead [1], but dropping extend_name (hence changing
sysfs filenames once again) would be considered an ABI break.

I've instead gone for a similar change that also ignores the node name
in favour of falling back to the driver string literal (if no "label"
property is available) while retaining extend_label [3] and the -
however ugly they are - sysfs filenames, but that'll likely get rejected
as strictly being an ABI break as well, not in the least because DT
needs to be patched up [3] for it to work out.

I'll at least test your patch when getting back to one of these devices.

- Marijn

[1]: https://lore.kernel.org/linux-arm-msm/20230116220909.196926-6-marijn.suijten@xxxxxxxxxxxxxx/
[2]: https://lore.kernel.org/linux-arm-msm/20230116220909.196926-4-marijn.suijten@xxxxxxxxxxxxxx/
[3]: https://lore.kernel.org/linux-arm-msm/20221209215308.1781047-1-marijn.suijten@xxxxxxxxxxxxxx/



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux