The code to handle AXP803_ID and AXP813_ID cases are exactly the same.
Make the switch-case fall through to avoid duplicate code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
*/
switch (axp20x->variant) {
case AXP803_ID:
+ case AXP813_ID:
regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, ®);
switch (id) {
}
break;
- case AXP813_ID:
- regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, ®);
-
- switch (id) {
- case AXP803_DCDC3:
- return !!(reg & BIT(6));
- case AXP803_DCDC6:
- return !!(reg & BIT(5));
- }
- break;
-
default:
return false;
}