1 2 Previous Next 15 Replies Latest reply on Nov 21, 2014 1:15 PM by Simba

    Preventing Cypress GPIO expander from going to sleep mode.

    Simba

      Hi,

       

      It seems like Cypress GPIO expander cy8c9540a supports only gpio_set_value_cansleep() but not gpio_set_value()

      I need the to use gpio_set_value() for external ADC I am interfacing with Galileo to enable buffered capture.

       

      How to enable cypress gpio expander to provide support for non sleep mode?

       

      comments form gpio_chip structure says that,

      * @can_sleep: flag must be set iff get()/set() methods sleep, as they

      * must while accessing GPIO expander chips over I2C or SPI


      In probe function of gpio driver, cy8c9540a .c, has the can_sleep flag set.

      cy8c9540a_probe(){

       

      -- snip--

       

      gc->can_sleep = 1;

       

      }


      Since GPIO expander in galileo is connected through i2c, I am guessing just clearing the flag is not sufficient.

      What  else should I do to get gpio_set_value() to work properly?

       

      I am using BSP 1.0.0 full build, SD Boot.

       

      Regards

      Simba

        1 2 Previous Next