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

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

 



On Tue, 2021-10-19 at 19:36 +0300, Andy Shevchenko wrote:
> 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.

Yeah, if "reading" from the PMIC can't be achieved with the current
mainline kernel, it does not make sense to add code for "reading" just
for the hack inside atomisp. Rather, in this case, adding the regulator
driver is a straightforward way.

We can already write with intel_soc_pmic_exec_mipi_pmic_seq_element(),
so what I wondered is, is there equivalent for "read"?

But yes, we should eventually use regulator driver anyway.

Regards,
Tsuchiya Yuto

> 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")
> 





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux