Re: [PATCH v13 2/9] mfd: qcom-spmi-pmic: expose the PMIC revid information to clients

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

 



On Thu, 28 Apr 2022, Caleb Connolly wrote:
> On 28/04/2022 17:14, Lee Jones wrote:
> > On Wed, 27 Apr 2022, Caleb Connolly wrote:
> > > On 25/04/2022 16:03, Lee Jones wrote:
> > > > 
> > > > On Wed, 23 Mar 2022, Caleb Connolly wrote:
> > > > > From: Caleb Connolly <caleb.connolly@xxxxxxxxxx>
> > > > > 
> > > > > Some PMIC functions such as the RRADC need to be aware of the PMIC
> > > > > chip revision information to implement errata or otherwise adjust
> > > > > behaviour, export the PMIC information to enable this.
> > > > > 
> > > > > This is specifically required to enable the RRADC to adjust
> > > > > coefficients based on which chip fab the PMIC was produced in,
> > > > > this can vary per unique device and therefore has to be read at
> > > > > runtime.
> > > > > 
> > > > > Signed-off-by: Caleb Connolly <caleb.connolly@xxxxxxxxxx>
> > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > > > > Tested-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > > > > ---
> > > > >    drivers/mfd/qcom-spmi-pmic.c      | 261 +++++++++++++++++++-----------
> > > > >    include/soc/qcom/qcom-spmi-pmic.h |  60 +++++++
> > > > >    2 files changed, 231 insertions(+), 90 deletions(-)
> > > > >    create mode 100644 include/soc/qcom/qcom-spmi-pmic.h
> > 
> > [...]
> > 
> > > > > +			/*
> > > > > +			 * If the base USID for this PMIC hasn't probed yet
> > > > > +			 * but the secondary USID has, then we need to defer
> > > > > +			 * the function driver so that it will attempt to
> > > > > +			 * probe again when the base USID is ready.
> > > > > +			 */
> > > > > +			if (pmic_addr == function_parent_usid  - (ctx->num_usids - 1))
> > > > 
> > > > Double "  ".
> > > Ack
> > > > 
> > > > Over-bracketing of statements with matching operands.
> > > I don't think x - (y - 1) is equal to x - y - 1? Or am I misunderstanding you here?
> > 
> > Can you give me an example when this would be the case?
> According to the Python interpreter:
> >>> x=7
> >>> y=4
> >>> x - y - 1
> 2
> >>> x - (y - 1)
> 4
> 
> C does also respect the first rule of BODMAS - parenthesis are always
> evaluated first.

Fair point, well presented.

Thanks for this - I understand the problem now.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog



[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