On Thu, Nov 24, 2022 at 10:00 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Make the GPIO to sensor mapping more generic and fold the > INT3472_GPIO_TYPE_RESET and INT3472_GPIO_TYPE_POWERDOWN cases into > a single generic case. > > This is a preparation patch for further GPIO mapping changes. ... > +static const char *int3472_dsm_type_to_func(u8 type) > +{ > + switch (type) { > + case INT3472_GPIO_TYPE_RESET: > + return "reset"; > + case INT3472_GPIO_TYPE_POWERDOWN: > + return "powerdown"; > + case INT3472_GPIO_TYPE_CLK_ENABLE: > + return "clken"; > + case INT3472_GPIO_TYPE_PRIVACY_LED: > + return "pled"; > + case INT3472_GPIO_TYPE_POWER_ENABLE: > + return "power-enable"; default: return "unknown"; ? > + } > + > + return "unknown"; > +} -- With Best Regards, Andy Shevchenko