summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel_cht_int33fe_typec.c
AgeCommit message (Collapse)AuthorFilesLines
2020-04-20platform/x86: intel_cht_int33fe: Fix spelling issuesAndy Shevchenko1-10/+10
Fix spelling issues over the comments in the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
2020-04-20platform/x86: intel_cht_int33fe: Switch to use acpi_dev_hid_uid_match()Andy Shevchenko1-4/+1
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
2020-04-20platform/x86: intel_cht_int33fe: Convert to use set_secondary_fwnode()Andy Shevchenko1-2/+1
In one place we open coded set_secondary_fwnode(). Let's replace it with a helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
2020-04-20platform/x86: intel_cht_int33fe: Convert software node array to groupAndy Shevchenko1-34/+44
Code looks and be read cleaner when software nodes are defined individually. Convert software node array to a group in order to achieve above. While here, switch struct initializers to C99 standard. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
2019-12-03platform/x86: intel_cht_int33fe: use inline reference propertiesDmitry Torokhov1-40/+41
Now that static device properties allow defining reference properties together with all other types of properties, instead of managing them separately, let's adjust the driver. Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-10-15platform/x86: intel_cht_int33fe: Split code to Micro-B and Type-CYauhen Kharuzhy1-0/+354
Existing intel_cht_int33fe ACPI pseudo-device driver assumes that hardware has Type-C connector and register related devices described as I2C connections in the _CRS resource. There is at least one hardware (Lenovo Yoga Book YB1-91L/F) with Micro-B USB connector exists. It has INT33FE device in the DSDT table but there are only two I2C connection described: PMIC and BQ27452 battery fuel gauge. Splitting existing INT33FE driver allow to maintain code for USB Micro-B (or AB) connector variant separately and make it simpler. Split driver to intel_cht_int33fe_common.c and intel_cht_int33fe_{microb,typec}.c. Compile all this sources to one .ko module to make user experience easier. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>