Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones

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

 



On Fri, Jun 30, 2023 at 08:42:23PM +0300, Dmitry Baryshkov wrote:
> On Fri, 30 Jun 2023 at 19:15, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
> >
> > On 30.06.2023 14:57, Dmitry Baryshkov wrote:
> > > On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
> > >>
> > >> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> > >>> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
> > >>>>
> > >>>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> > >>>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> > >>>>> PMIC interface. This includes several onboard sensors and the XO thermal
> > >>>>> sensor.
> > >>>>>
> > >>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > >>>>> ---
> > >>>> [...]
> > >>>>>
> > >>>>> +     channel@144 {
> > >>>>> +             reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> > >>>> This define should be cleaned up.. Since it takes a sid argument,
> > >>>> it really is ADC7_AMUX_THM1_100K_PU(sid)
> > >>>
> > >>> I don't think I understood your comment. The define itself is specific
> > >>> to PM8350, other PMICs might have different channel assignments.
> > >>
> > >> include/dt-bindings/iio/qcom,spmi-vadc.h
> > >> 263:#define ADC7_AMUX_THM1_100K_PU                      0x44
> > >
> > > Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
> > > ADC7_AMUX_THM1_100K_PU ?
> > > Or to make all users use ADC7_AMUX_THM1_100K_PU?
> >
> >
> > >Or add the SID
> > > argument to ADC7_AMUX_THM1_100K_PU and switch to it?
> > This.
> >
> > Since we have a generic binding for it (not sure what sort of ABI-ish rules
> > apply here, probably not very many since it's just a dumb preprocessor define),
> > we should not redefine it for each PMIC, especially since the SIDs are variable
> > nowadays :/
> 
> I think it would be worth to have per-PMIC headers (which define which
> channels are available on this PMIC), but to use values from the
> qcom,spmi-vadc.h  header to define those per-PMIC values.
> 
> WDYT?
> 

Note that the channel relates to this PMIC, but the sid is of the
measured PMIC. So I'm not sure which PMIC you're thinking of when you
say per-PMIC...

Regards,
Bjorn



[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