
30 Jan
2020
30 Jan
'20
3:16 a.m.
Hi Wolfgang,
On Fri, 13 Dec 2019 at 01:49, Wolfgang Wallner wolfgang.wallner@br-automation.com wrote:
Hi Simon, Bin,
+static int intel_gpio_direction_output(struct udevice *dev, uint offset,
int value)
+{
struct udevice *pinctrl = dev_get_parent(dev);
uint config_offset = intel_pinctrl_get_config_reg_addr(pinctrl, offset);
pcr_clrsetbits32(dev, config_offset,
I think we should pass 'pinctrl' instead of 'dev' here. As far as I understand the code the function pcr_clrsetbits32 expects a pinctrl device with a p2sb parent.
PAD_CFG0_MODE_MASK | PAD_CFG0_RX_STATE |
PAD_CFG0_TX_DISABLE,
We also need to clear the bit PAD_CFG0_TX_STATE here. Otherwise if a gpio is set to high once it can never be set to low again.
PAD_CFG0_MODE_GPIO | PAD_CFG0_RX_DISABLE |
(value ? PAD_CFG0_TX_STATE : 0));
I see you have sent patches for these, thank you,
Regards, Simon