Re: [PATCH] pinctrl: sh-pfc: Retain TDSELCTRL register across suspend/resume

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

 



On 2/18/19 2:32 PM, Geert Uytterhoeven wrote:
> Hi Marek,

Hi,

[...]

>>>>  struct pinmux_data_reg {
>>>>         u32 reg;
>>>>         u8 reg_width;
>>>> @@ -270,6 +274,7 @@ struct sh_pfc_soc_info {
>>>>         const struct pinmux_drive_reg *drive_regs;
>>>>         const struct pinmux_bias_reg *bias_regs;
>>>>         const struct pinmux_ioctrl_reg *ioctrl_regs;
>>>> +       const struct pinmux_tdsel_reg *tdsel_regs;
>>>>         const struct pinmux_data_reg *data_regs;
>>>>
>>>>         const u16 *pinmux_data;
>>>
>>> Is there any special reason why you added a new block of registers with
>>> separate handling, instead of adding TDSEL to the existing
>>> pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like
>>> POCCTRL?
>>
>> For one, It's unrelated register to POCCTRL, so I don't want to mix them
> 
> That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
> it is meant to cover various I/O control registers, including POCCTRL and
> TDSEL, to be saved/restored for PSCI system suspend.

I thought the array is called pinmux_ioctrl_reg[] because that's what
the pocctrl was called in older datasheets ? At least that's how you
explained it on IRC last time.

>> together. The other reason is this r8a779*_pin_to_pocctrl(), which uses
>> the ioctrl_regs[] array ; if I added the TDSEL there, that'd just make
>> things extra confusing.
> 
> How r8a779*_pin_to_pocctrl() gets the registers is an implementation detail,
> IMHO (The function used to contain hardcoded register addresses).
> 
> So I think you should just add the TDSEL registers to pinmux_ioctrl_reg[].

If that's what you think is better and makes the driver less confusing,
sure ...

-- 
Best regards,
Marek Vasut



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux