[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250628173112.63d9334e@jic23-huawei>
Date: Sat, 28 Jun 2025 17:31:12 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Jishnu Prakash <jishnu.prakash@....qualcomm.com>
Cc: robh@...nel.org, krzysztof.kozlowski@...aro.org, krzk+dt@...nel.org,
conor+dt@...nel.org, agross@...nel.org, andersson@...nel.org,
lumag@...nel.org, dmitry.baryshkov@....qualcomm.com,
konradybcio@...nel.org, daniel.lezcano@...aro.org, sboyd@...nel.org,
amitk@...nel.org, thara.gopinath@...il.com, lee@...nel.org,
rafael@...nel.org, subbaraman.narayanamurthy@....qualcomm.com,
david.collins@....qualcomm.com, anjelique.melendez@....qualcomm.com,
quic_kamalw@...cinc.com, rui.zhang@...el.com, lukasz.luba@....com,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, cros-qcom-dts-watchers@...omium.org,
quic_skakitap@...cinc.com, neil.armstrong@...aro.org,
stephan.gerhold@...aro.org
Subject: Re: [PATCH V6 4/5] iio: adc: Add support for QCOM PMIC5 Gen3 ADC
> >> + .hw_settle_1 = (unsigned int [VADC_HW_SETTLE_SAMPLES_MAX])
> >> + { 15, 100, 200, 300, 400, 500, 600, 700,
> >> + 1000, 2000, 4000, 8000, 16000, 32000,
> >> + 64000, 128000 },
> > Andy often points this out, but I'll do it this time. Fixed numbers (typically power of 2)
> > elements per line make it much easier to see which element is which in these arrays.
> > Reduce the indent a little to allow that here.
>
> Does this look fine?
>
> .hw_settle_1 = (unsigned int [VADC_HW_SETTLE_SAMPLES_MAX])
> { 15, 100, 200, 300,
> 400, 500, 600, 700,
> 1000, 2000, 4000, 8000,
> 16000, 32000, 64000, 128000 },
Look good.
> >> +static int adc5_gen3_probe(struct platform_device *pdev)
> >> +{
> >
> >> +
> >> + platform_set_drvdata(pdev, indio_dev);
> >> + init_completion(&adc->complete);
> >> + mutex_init(&adc->lock);
> > If spinning again for other reasons, in new code I have slight preference for
> > ret = devm_mutex_init(&adc->lock);
> > if (ret)
> > return ret;
> >
> > It was never worth bothering with release until we had devm managed form but
> > now we do the code complexity cost is low enough to make it reasonable.
> >
> >> + indio_dev->name = pdev->name;
> >
> > Just to check. Does that end up as a part number or similar?
>
> I printed this name and it appeared like this:
>
> indio_dev->name: c426000.spmi:pmic@0:adc@...0
>
> It only gets the DT node names, which are generic, there are
> no part numbers in this name.
I thought it might be something along those lines.
indio_dev->name should be the part number so hard code it rather than
getting it from the pdev->name
Jonathan
Powered by blists - more mailing lists