[PATCH v2 2/2] Subject: Update PWM driver imported from BBBIO

Martin Galvan martin.galvan at tallertechnologies.com
Thu Jun 30 21:24:35 UTC 2016


Thanks for re-sending. FYI the "v2" goes for all the patches in the
thread, not just the one you actually changed. If you want to be
extra-clear you could add a "Changes in v2:" header to each patch.

On Thu, Jun 30, 2016 at 6:04 PM, Punit Vara <punitvara at gmail.com> wrote:
> +  if((pwm_id <3) && (pwm_id >=0)) {
> +  switch(pwm_id)  {
> +       case BBB_PWMSS2:
> +               switch(pin_no) {
> +                       case BBB_P8_13_2B:
> +                               REG(AM335X_PADCONF_BASE + BBB_CONTROL_CONF_GPMC_AD(9)) = BBB_MUXMODE(BBB_MUX4);
> +                               break;
> +                       case BBB_P8_19_2A:
> +                               REG(AM335X_PADCONF_BASE + BBB_CONTROL_CONF_GPMC_AD(8)) = BBB_MUXMODE(BBB_MUX4);
> +                               break;
> +                       case BBB_P8_45_2A:
> +                               REG(AM335X_PADCONF_BASE + BBB_CONTROL_CONF_LCD_DATA(0)) = BBB_MUXMODE(BBB_MUX3);
> +                               break;
> +                       case BBB_P8_46_2B:
> +                               REG(AM335X_PADCONF_BASE + BBB_CONTROL_CONF_LCD_DATA(1)) = BBB_MUXMODE(BBB_MUX3);
> +                               break;
> +                       default :
> +                               printf("Invalid pin for module 2\n");
> +                               break;
>                 }

This is still returning true for error cases. What happens if the user
selects a valid PWM ID but an invalid pin?



More information about the devel mailing list