[PATCH v3 4/9] reset: amlogic: add driver parameters

Jerome Brunet jbrunet at baylibre.com
Mon Aug 19 09:40:02 PDT 2024


On Mon 19 Aug 2024 at 17:57, Neil Armstrong <neil.armstrong at linaro.org> wrote:

>> +	assert ^= data->param->level_low_reset;
>>     	return regmap_update_bits(data->map, offset,
>> -				  BIT(bit), assert ? 0 : BIT(bit));
>> +				  BIT(bit), assert ? BIT(bit) : 0);
>>   }
>>     static int meson_reset_assert(struct reset_controller_dev *rcdev,
>> @@ -84,17 +88,23 @@ static const struct reset_control_ops meson_reset_ops = {
>>     static const struct meson_reset_param meson8b_param = {
>>   	.reg_count	= 8,
>> +	.reset_offset	= 0x0,
>>   	.level_offset	= 0x7c,
>> +	.level_low_reset = true,
>>   };
>>     static const struct meson_reset_param meson_a1_param = {
>>   	.reg_count	= 3,
>> +	.reset_offset	= 0x0,
>>   	.level_offset	= 0x40,
>> +	.level_low_reset = true,
>>   };
>>     static const struct meson_reset_param meson_s4_param = {
>>   	.reg_count	= 6,
>> +	.reset_offset	= 0x0,
>>   	.level_offset	= 0x40,
>> +	.level_low_reset = true,
>
> Just a comment, I would rather leave the "default" users of this driver with the default value
> and use level_high_reset = true for the clock ones

In every other place in the kernel, we specify that kind of thing if it
is acitve low. Your request make things up-side-down and harder to
follow IMO.

There is no 'default' user, there is the platform ones and auxiliary ones.
Platform ones tend to active low reset line. It is clearly shown above
and hard to miss when adding new platforms.

>
> Neil
>
>>   };
>>     static const struct of_device_id meson_reset_dt_ids[] = {

-- 
Jerome



More information about the linux-amlogic mailing list