08 Jan, 2020

1 commit

  • This header file now only includes the cros_ec_dev struct, however, is the
    'include/linux/platform_data/cros_ec_proto.h' who contains the definition of
    all the Chrome OS EC related structs. There is no reason to have a
    separate include for this struct so move to the place where other
    structs are defined. That way, we can remove the include itself, but also
    simplify the common pattern

    #include
    #include

    for a single include

    #include

    The changes to remove the cros_ec.h include were generated with the
    following shell script:

    git grep -l "" | xargs sed -i '//d'

    Signed-off-by: Enric Balletbo i Serra
    Acked-by: Lee Jones
    Acked-by: Alexandre Belloni
    Acked-by: Jonathan Cameron
    Acked-by: Sebastian Reichel
    Acked-by: Hans Verkuil

    Enric Balletbo i Serra
     

02 Sep, 2019

1 commit

  • There is a bit of mess between cros-ec mfd includes and platform
    includes. For example, we have a linux/mfd/cros_ec.h include that
    exports the interface implemented in platform/chrome/cros_ec_proto.c. Or
    we have a linux/mfd/cros_ec_commands.h file that is non related to the
    multifunction device (in the sense that is not exporting any function of
    the mfd device). This causes crossed includes between mfd and
    platform/chrome subsystems and makes the code difficult to read, apart
    from creating 'curious' situations where a platform/chrome driver includes
    a linux/mfd/cros_ec.h file just to get the exported functions that are
    implemented in another platform/chrome driver.

    In order to have a better separation on what the cros-ec multifunction
    driver does and what the cros-ec core provides move and rework the
    affected includes doing:

    - Move cros_ec_commands.h to include/linux/platform_data/cros_ec_commands.h
    - Get rid of the parts that are implemented in the platform/chrome/cros_ec_proto.c
    driver from include/linux/mfd/cros_ec.h to a new file
    include/linux/platform_data/cros_ec_proto.h
    - Update all the drivers with the new includes, so
    - Drivers that only need to know about the protocol include
    - linux/platform_data/cros_ec_proto.h
    - linux/platform_data/cros_ec_commands.h
    - Drivers that need to know about the cros-ec mfd device also include
    - linux/mfd/cros_ec.h

    Signed-off-by: Enric Balletbo i Serra
    Acked-by: Andy Shevchenko
    Acked-by: Mark Brown
    Acked-by: Wolfram Sang
    Acked-by: Neil Armstrong
    Acked-by: Alexandre Belloni
    Acked-by: Jonathan Cameron
    Acked-by: Benjamin Tissoires
    Acked-by: Dmitry Torokhov
    Acked-by: Sebastian Reichel
    Acked-by: Chanwoo Choi
    Reviewed-by: Gwendal Grignou
    Tested-by: Gwendal Grignou
    Series changes: 3
    - Fix dereferencing pointer to incomplete type 'struct cros_ec_dev' (lkp)
    Signed-off-by: Lee Jones

    Enric Balletbo i Serra
     

05 Jun, 2019

1 commit

  • Fix sparse warning:

    drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
    drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
    drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
    drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
    drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
    drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?

    Reported-by: Hulk Robot
    Signed-off-by: YueHaibing
    Reviewed-by: Benson Leung
    Signed-off-by: Enric Balletbo i Serra

    YueHaibing
     

01 Feb, 2019

3 commits

  • Adopt the SPDX license identifier headers to ease license compliance
    management.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck

    Enric Balletbo i Serra
     
  • The cros-ec-vbc driver is DT-only and there is a DT property that
    indicates if the EC has the VCB NVRAM, in such case instantiate the
    driver but don't instantiate on the other cases.

    To do this move the check code to its parent instead of play with the
    attribute group visibility. This changes a bit the actual behaviour.
    Before the patch if an EC doesn't have a VBC NVRAM an empty vbc folder
    is created in /sys/class/chromeos/, after the patch the
    empty folder is not created, so, the folder is only created if the vbc
    is set.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Enric Balletbo i Serra
     
  • The entire way how cros sysfs attibutes are created is broken.
    cros_ec_vbc should be its own driver and its attributes should be
    associated with a vbc driver not the mfd driver. In order to retain
    the path, the vbc attributes are attached to the cros_class.

    The patch also adds the sysfs documentation.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Enric Balletbo i Serra
     

31 May, 2018

1 commit


15 Dec, 2017

1 commit

  • This patch splits the cros_ec_devs module in two parts with a
    cros_ec_dev module responsible for handling MFD devices registration and
    a cros_ec_ctl module responsible for handling the various user-space
    interfaces.

    For consistency purpose, the driver name for the cros_ec_dev module is
    now cros-ec-dev instead of cros-ec-ctl.

    In the next commit, the new cros_ec_dev module will be moved to the MFD
    subtree so mfd_add_devices() calls are not done from outside MFD.

    Signed-off-by: Thierry Escande
    Reviewed-by: Gwendal Grignou
    Tested-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Thierry Escande
     

08 Oct, 2015

1 commit