Re: [PATCH 00/17] various fixes for atomisp to make it work

Andy Shevchenko
2021-10-19T16:37:26Z

On Tue, Oct 19, 2021 at 10:50:27PM +0900, Tsuchiya Yuto wrote:
> On Mon, 2021-10-18 at 09:48 +0200, Hans de Goede wrote:
> > On 10/17/21 18:19, Tsuchiya Yuto wrote:

...

> > > ## for mipad2 (and whiskey cove pmic based devices)
> > >
> > > For devices which equip whiskey cove PMIC, you need to add non-upstream
> > > regulator driver [1].
> > >
> > > [1] work done by jekhor, which seems to be from intel-aero or old
> > > Android kernel
> > > https://github.com/jekhor/yogabook-linux-kernel/commit/11c05b365fb2eeb4fced5aa66b362c511be32a34
> > > ("intel_soc_pmic_chtwc: Add regulator driver and definition for VPROG1B")
> >
> > Interesting I recently bought a 2nd hand mipad2 myself too. I still need
> > to put Linux on there. I'm definitely motivated to do that now :)
>
> I'm glad to hear that you also got a mipad2 :) It might be a interesting
> device to look into. It even won't boot without nomodeset, no battery
> charging/status on mainline kernel.
>
> By the way, instead of adding whiskey cove regulator driver, we may also
> add a "hack" like the other PMIC in atomisp_gmin_platform to control
> regulators [1].

I looked briefly into the code and if we indeed need to turn off or on
the regulators it should be a driver.

I don't like having hacks outside of driver/staging to satisfy the one from
the staging.

I.o.w. having a regulator driver is a right thing to do in my opinion.

> It seems that to do so, it needs to "read" value from the PMIC before
> writing. So, I'm not sure if this can be achieved easily with the current
> mainline kernel though.
>
> [1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/commit/6204d4b7aeefc4db622f8ac57b87bf2c76c6c8aa
> ("atomisp_platform: add whiskey cove pmic support")

--
With Best Regards,
Andy Shevchenko