This patch ensures that the TWIHS (i2c) hw get's its clock set when the sequence of
sam_i2cbus_initialize sam_i2cbus_uninitialize sam_i2cbus_initialize Or twi_reset is called. I found this a while back in the stm32 family, so there may be more arch-es with this sort of bug. I suppose any driver that has the notion of "do not set the freq if it is already set" could be suspect.
This commit is contained in:
parent
c019c270d5
commit
fca329945b
@ -901,6 +901,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid,
|
||||
|
||||
/* Set the initial TWI data transfer frequency */
|
||||
|
||||
priv->i2cfreq = 0;
|
||||
twi_setfrequency(priv, frequency);
|
||||
}
|
||||
|
||||
|
@ -1200,6 +1200,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency)
|
||||
|
||||
/* Set the initial TWI data transfer frequency */
|
||||
|
||||
priv->frequency = 0
|
||||
twi_setfrequency(priv, frequency);
|
||||
|
||||
/* Enable Interrupts */
|
||||
|
@ -1230,6 +1230,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency)
|
||||
|
||||
/* Set the initial TWIHS data transfer frequency */
|
||||
|
||||
priv->frequency = 0;
|
||||
twi_setfrequency(priv, frequency);
|
||||
|
||||
/* Enable Interrupts */
|
||||
|
Loading…
Reference in New Issue
Block a user