aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-03-11 11:48:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-19 15:06:11 +0100
commit31df7fadf50f7c8030644d427fc8868e9bb52109 (patch)
treee1fc94ff50829d81814b460ff46595462c62065c /tools/perf/scripts/python/export-to-postgresql.py
parentusb: typec: pi3usb30532: Keep orientation when setting mux to safe mode (diff)
downloadlinux-31df7fadf50f7c8030644d427fc8868e9bb52109.tar.gz
linux-31df7fadf50f7c8030644d427fc8868e9bb52109.zip
usb: typec: fusb302: Make fusb302_set_cc_polarity also set pull ups / downs
The 2 callers of fusb302_set_cc_polarity both call fusb302_set_cc_pull directly before calling fusb302_set_cc_polarity, this is not ideal for 2 reasons: 1) fusb302_set_cc_pull uses the cached polarity when applying the pull-ups, which maybe changed immediately afterwards, to fix this set_cc_polarity already does the pull-up setting. 2) Both touch the SWITCHES0 register in a r-w-modify cycle, this leads to read reg, write reg, read reg, write reg. If we fold the setting of the pull-downs into fusb302_set_cc_polarity then not only can we avoid doing the reads / writes twice, at this point we set all bits, so we can skip the read, turning 4 (slowish) i2c-transfers into 1. Doing this also avoids the need to cache the pull_up state in struct fusb302_chip. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions