Re: [PATCH 3/3] net: phy: dp83826: add support for voltage tuning of logical levels

From: POPESCU Catalin
Date: Thu Jan 11 2024 - 11:54:34 EST


On 11.01.24 17:45, Andrew Lunn wrote:
> [You don't often get email from andrew@xxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
>
>
>> +u8 dp83826_cfg_dac_minus_raw[DP83826_CFG_DAC_RAW_VALUES_MAX] = {0x38, 0x37, 0x36, 0x35, 0x34, 0x33,
>> + 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d,
>> + 0x2c, 0x2b, 0x2a, 0x29, 0x28};
>> +u8 dp83826_cfg_dac_plus_raw[DP83826_CFG_DAC_RAW_VALUES_MAX] = {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
>> + 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13,
>> + 0x14, 0x15, 0x16, 0x17, 0x18};
> Both of these should be static const.
Indeed.
>
> However, they appear pointless. Plus is just a shift. minus is some
> simple arithmetic and a shift.
Well, I found it more clear to use a bit of memory than adding
instructions to compute some raw values from other raw values used as
reference.
>
> Andrew