[PATCH 2/2] regulator: rpi-panel-v2: Add regulator for 7" Raspberry Pi 720x1280

Marek Vasut marek.vasut at mailbox.org
Mon Jun 16 17:52:22 PDT 2025


On 6/11/25 10:30 PM, Uwe Kleine-König wrote:
> Hello Marek,

Hi,

> On Mon, Jun 09, 2025 at 02:06:42AM +0200, Marek Vasut wrote:
>> +static int rpi_panel_v2_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
>> +				  const struct pwm_state *state)
>> +{
>> +	struct regmap *regmap = pwmchip_get_drvdata(chip);
>> +	unsigned int duty;
>> +
>> +	if (state->polarity != PWM_POLARITY_NORMAL)
>> +		return -EINVAL;
>> +
>> +	if (!state->enabled)
>> +		return regmap_write(regmap, REG_PWM, 0);
> 
> I would swap these two if blocks to ensure that disable works even if
> the wrong polarity is passed.
I have now sent the conversion to waveform ops patch, so I hope that 
addresses all the topics in this feedback. Thanks!



More information about the linux-arm-kernel mailing list