Debugfs and Sysfs entries for MHI
Subsystems (2)
cover Debugfs and Sysfs entries for MHI
Introduce debugfs and sysfs entries for MHI.
Fixes to allow building MHI as a module without warnings/errors.
This set of patches was tested on arm64 and x86_64 architectures.
Bhaumik Bhatt (3):
bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
bus: mhi: core: Introduce debugfs entries for MHI
bus: mhi: core: Introduce sysfs entries for MHI
Documentation/ABI/stable/sysfs-bus-mhi | 21 ++ MAINTAINERS | 1 + drivers/bus/mhi/Kconfig | 8 + drivers/bus/mhi/core/Makefile | 1 + drivers/bus/mhi/core/boot.c | 3 + drivers/bus/mhi/core/debugfs.c | 413 +++++++++++++++++++++++++++++++++ drivers/bus/mhi/core/init.c | 60 +++++ drivers/bus/mhi/core/internal.h | 24 ++ drivers/bus/mhi/core/main.c | 3 + drivers/bus/mhi/core/pm.c | 3 + include/linux/mhi.h | 2 + 11 files changed, 539 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-bus-mhi create mode 100644 drivers/bus/mhi/core/debugfs.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/3 bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
When building MHI as a module, missing MODULE_LICENSE() warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.
--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)
drivers/bus/mhi/core/boot.c +3 -0
@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );
drivers/bus/mhi/core/main.c +3 -0
@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );
drivers/bus/mhi/core/pm.c +3 -0
@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v1 1/3] bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
Quoted 39 lines · Bhaumik Bhatt
When building MHI as a module, missing
MODULE_LICENSE()warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.Signed-off-by Bhaumik Bhatt <[email protected]>--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)drivers/bus/mhi/core/boot.c +3
-0@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/main.c +3
-0@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/pm.c +0
-0
drivers/bus/mhi/core/pm.c void mhi_device_put(struct mhi_device *mhi_dev) · line 1155
Quoted 6 lines
drivers/bus/mhi/core/pm.c +3
-0@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );
I would expect you only need to add the MODULE_* once per module, in which case main.c is probably the only place that needs it.
Signature · 3 lines
Jeffrey Hugo Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v1 1/3] bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
Quoted 43 lines · Jeffrey Hugo
Quoted 42 lines · Bhaumik Bhatt
When building MHI as a module, missing
MODULE_LICENSE()warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.Signed-off-by Bhaumik Bhatt <[email protected]>--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)drivers/bus/mhi/core/boot.c +3
-0@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/main.c +3
-0@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/pm.c +0
-0@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }
Quoted 8 lines
drivers/bus/mhi/core/pm.c void mhi_device_put(struct mhi_device *mhi_dev) · line 1155
Quoted 5 lines
drivers/bus/mhi/core/pm.c +3
-0EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );I would expect you only need to add the MODULE_* once per module, in which case
main.cis probably the only place that needs it.
Hi Jeff,
I thought so too. This is to fix below warnings seen when building MHI as a MODULE:
WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/main.o
WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/pm.o
WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/boot.o
We've only had those in init.c so far.
Thanks,
Bhaumik
'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
Re: [PATCH v1 1/3] bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
Quoted 55 lines · On Fri, Sep 18, 2020 at 09:49:05AM -0700, [email protected] wrote:
Quoted 43 lines · Jeffrey Hugo
Quoted 42 lines · Bhaumik Bhatt
When building MHI as a module, missing
MODULE_LICENSE()warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.Signed-off-by Bhaumik Bhatt <[email protected]>--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)drivers/bus/mhi/core/boot.c +3
-0@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/main.c +3
-0@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/pm.c +0
-0@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }Quoted 8 lines
drivers/bus/mhi/core/pm.c void mhi_device_put(struct mhi_device *mhi_dev) · line 1155
Quoted 5 lines
drivers/bus/mhi/core/pm.c +3
-0EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );I would expect you only need to add the MODULE_* once per module, in which case
main.cis probably the only place that needs it.Hi Jeff,
Quoted 9 lines
I thought so too. This is to fix below warnings seen when building MHI as a MODULE:
WARNING: modpost: missing
MODULE_LICENSE()indrivers/bus/mhi/core/main.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/pm.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/boot.oWe've only had those in
init.cso far.
Can you please test below diff to see if it fixes the warning?
drivers/bus/mhi/core/Makefile +1 -1
@@ -1,3 +1,3 @@ -obj-$(CONFIG_MHI_BUS) := mhi.o +obj-$(CONFIG_MHI_BUS) += mhi.o mhi-y := init.o main.o pm.o boot.o
Thanks,
Mani
Quoted 5 lines
Thanks,
Bhaumik'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
Re: [PATCH v1 1/3] bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
Quoted 78 lines · Manivannan Sadhasivam
Quoted 55 lines · On Fri, Sep 18, 2020 at 09:49:05AM -0700, [email protected] wrote:
Quoted 43 lines · Jeffrey Hugo
Quoted 42 lines · Bhaumik Bhatt
When building MHI as a module, missing
MODULE_LICENSE()warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.Signed-off-by Bhaumik Bhatt <[email protected]>--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)drivers/bus/mhi/core/boot.c +3
-0@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/main.c +3
-0@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/pm.c +0
-0@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }Quoted 8 lines
drivers/bus/mhi/core/pm.c void mhi_device_put(struct mhi_device *mhi_dev) · line 1155
Quoted 5 lines
drivers/bus/mhi/core/pm.c +3
-0EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );I would expect you only need to add the MODULE_* once per module, in which case
main.cis probably the only place that needs it.Hi Jeff,
Quoted 9 lines
I thought so too. This is to fix below warnings seen when building MHI as a MODULE:
WARNING: modpost: missing
MODULE_LICENSE()indrivers/bus/mhi/core/main.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/pm.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/boot.oWe've only had those in
init.cso far.Can you please test below diff to see if it fixes the warning?
drivers/bus/mhi/core/Makefile +1
-1@@ -1,3 +1,3 @@ -obj-$(CONFIG_MHI_BUS) := mhi.o +obj-$(CONFIG_MHI_BUS) += mhi.o mhi-y := init.o main.o pm.o boot.o
Quoted 8 lines
Thanks,
ManiQuoted 5 lines
Thanks,
Bhaumik'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
Hi Mani,
Yes I was just about to reply. I realized it was due to the Makefile change. I have fixed and tested it. The warnings are gone now. I will remove the patch.
Thanks,
Bhaumik
'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
Re: [PATCH v1 1/3] bus: mhi: core: Remove warnings for missing MODULE_LICENSE()
Quoted 90 lines · On Fri, Sep 18, 2020 at 11:48:21AM -0700, [email protected] wrote:
Quoted 89 lines · Manivannan Sadhasivam
Quoted 59 lines · On Fri, Sep 18, 2020 at 09:49:05AM -0700, [email protected] wrote:
Quoted 43 lines · Jeffrey Hugo
Quoted 42 lines · Bhaumik Bhatt
When building MHI as a module, missing
MODULE_LICENSE()warnings are seen. Avoid them by adding the license and description information for the files where the warnings are seen.Signed-off-by Bhaumik Bhatt <[email protected]>--- drivers/bus/mhi/core/boot.c | 3 +++ drivers/bus/mhi/core/main.c | 3 +++ drivers/bus/mhi/core/pm.c | 3 +++ 3 files changed, 9 insertions(+)drivers/bus/mhi/core/boot.c +3
-0@@ -523,3 +523,6 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) error_alloc_fw_table:release_firmware (firmware); } + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/main.c +3
-0@@ -1533,3 +1533,6 @@ int mhi_poll(struct mhi_device *mhi_dev, u32 budget)return ret; }EXPORT_SYMBOL_GPL (mhi_poll); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );drivers/bus/mhi/core/pm.c +0
-0@@ -1150,3 +1150,6 @@ void mhi_device_put(struct mhi_device *mhi_dev)read_unlock_bh (&mhi_cntrl->pm_lock); }Quoted 8 lines
drivers/bus/mhi/core/pm.c void mhi_device_put(struct mhi_device *mhi_dev) · line 1155
Quoted 5 lines
drivers/bus/mhi/core/pm.c +3
-0EXPORT_SYMBOL_GPL (mhi_device_put); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("MHI Host Interface" );I would expect you only need to add the MODULE_* once per module, in which case
main.cis probably the only place that needs it.Hi Jeff,
I thought so too. This is to fix below warnings seen when building MHI as a
MODULE:Quoted 9 lines
WARNING: modpost: missing
MODULE_LICENSE()indrivers/bus/mhi/core/main.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/pm.o
WARNING: modpost: missingMODULE_LICENSE()indrivers/bus/mhi/core/boot.oWe've only had those in
init.cso far.Can you please test below diff to see if it fixes the warning?
drivers/bus/mhi/core/Makefile +1
-1@@ -1,3 +1,3 @@ -obj-$(CONFIG_MHI_BUS) := mhi.o +obj-$(CONFIG_MHI_BUS) += mhi.o mhi-y := init.o main.o pm.o boot.oThanks,
ManiQuoted 3 lines
Thanks,
Bhaumik
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
Hi Mani,
Yes I was just about to reply. I realized it was due to the
Makefilechange. I have fixed and
tested it. The warnings are gone now. I will remove the patch.
Where is the patch fixing this issue? I couldn't find it in my inbox. I'll just post one as I need to send out the PR today.
Thanks,
Mani
Quoted 5 lines
Thanks,
Bhaumik'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project'
PATCH 2/3 bus: mhi: core: Introduce debugfs entries for MHI
In reply to Bhaumik BhattIntroduce debugfs entries to show state, register, channel, device, and event rings information. Allow the host to dump registers, issue device wake, and change the MHI timeout to help in debug.
--- drivers/bus/mhi/Kconfig | 8 + drivers/bus/mhi/core/Makefile | 1 + drivers/bus/mhi/core/debugfs.c | 413 ++++++++++++++++++++++++++++++++++++++++ drivers/bus/mhi/core/init.c | 7 + drivers/bus/mhi/core/internal.h | 24 +++ include/linux/mhi.h | 2 + 6 files changed, 455 insertions(+) create mode 100644 drivers/bus/mhi/core/debugfs.c
drivers/bus/mhi/Kconfig +8 -0
@@ -12,3 +12,11 @@ config MHI_BUS communication protocol used by the host processors to control and communicate with modem devices over a high speed peripheral bus or shared memory. + +config MHI_BUS_DEBUG + bool "Debugfs support for the MHI bus" + depends on MHI_BUS && DEBUG_FS + help + Enable debugfs support for use with the MHI transport. Allows + reading and/or modifying some values within the MHI controller + for debug and test purposes.
drivers/bus/mhi/core/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_MHI_BUS) := mhi.o mhi-y := init.o main.o pm.o boot.o +mhi-$(CONFIG_MHI_BUS_DEBUG) += debugfs.o
drivers/bus/mhi/core/debugfs.c new file +413 -0
413 lines not on this page · raw message
drivers/bus/mhi/core/init.c +7 -0
@@ -4,6 +4,7 @@* */ +#include <linux/debugfs.h> #include <linux/device.h> #include <linux/dma-direction.h> #include <linux/dma-mapping.h>
@@ -915,6 +916,8 @@ int mhi_register_controller(struct mhi_controller *mhi_cntrl, mhi_cntrl->mhi_dev = mhi_dev; +mhi_create_debugfs (mhi_cntrl); +return 0 ; error_add_dev:
@@ -937,6 +940,8 @@ void mhi_unregister_controller(struct mhi_controller *mhi_cntrl)struct mhi_chan *mhi_chan = mhi_cntrl->mhi_chan;unsigned int i; +mhi_destroy_debugfs (mhi_cntrl); +kfree (mhi_cntrl->mhi_cmd);kfree (mhi_cntrl->mhi_event);
@@ -1300,11 +1305,13 @@ struct bus_type mhi_bus_type = {static int __init mhi_init (void ) { +mhi_debugfs_init ();return bus_register (&mhi_bus_type); } static void __exit mhi_exit(void) { +mhi_debugfs_exit ();bus_unregister (&mhi_bus_type); }
drivers/bus/mhi/core/internal.h +24 -0
@@ -570,6 +570,30 @@ struct mhi_chan {/* Default MHI timeout */ #define MHI_TIMEOUT_MS (1000) +/* debugfs related functions */ +#ifdef CONFIG_MHI_BUS_DEBUG +void mhi_create_debugfs (struct mhi_controller *mhi_cntrl); +void mhi_destroy_debugfs (struct mhi_controller *mhi_cntrl); +void mhi_debugfs_init (void ); +void mhi_debugfs_exit (void ); +#else +static inline void mhi_create_debugfs (struct mhi_controller *mhi_cntrl) +{ +} + +static inline void mhi_destroy_debugfs (struct mhi_controller *mhi_cntrl) +{ +} + +static inline void mhi_debugfs_init (void ) +{ +} + +static inline void mhi_debugfs_exit (void ) +{ +} +#endif +struct mhi_device *mhi_alloc_device (struct mhi_controller *mhi_cntrl);int mhi_destroy_device (struct device *dev,void *data);
include/linux/mhi.h +2 -0
@@ -291,6 +291,7 @@ struct mhi_controller_config {* @cntrl_dev: Pointer to the struct device of physical bus acting as the MHI * controller (required) * @mhi_dev: MHI device instance for the controller +* @debugfs_dentry: MHI controller debugfs directory * @regs: Base address of MHI MMIO register space (required) * @bhi: Points to base of MHI BHI register space * @bhie: Points to base of MHI BHIe register space
@@ -370,6 +371,7 @@ struct mhi_controller_config {struct mhi_controller {struct device *cntrl_dev;struct mhi_device *mhi_dev; +struct dentry *debugfs_dentry;void __iomem *regs;void __iomem *bhi;void __iomem *bhie;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v1 2/3] bus: mhi: core: Introduce debugfs entries for MHI
Quoted 6 lines · Bhaumik Bhatt
drivers/bus/mhi/Kconfig +0
-0@@ -12,3 +12,11 @@ config MHI_BUS communication protocol used by the host processors to control
drivers/bus/mhi/Kconfig config MHI_BUS · line 22
Quoted 10 lines
drivers/bus/mhi/Kconfig +8
-0and communicate with modem devices over a high speed peripheral bus or shared memory. + +config MHI_BUS_DEBUG + bool "Debugfs support for the MHI bus" + depends on MHI_BUS && DEBUG_FS + help + Enable debugfs support for use with the MHI transport. Allows + reading and/or modifying some values within the MHI controller + for debug and test purposes.
from Documentation/process/coding-style.rst:
"""For all of the Kconfig* configuration files throughout the source tree, the indentation is somewhat different. Lines under a ``config`` definition are indented with one tab, while help text is indented an additional two spaces."""
Several lines above use spaces instead of one tab...
Signature · 1 line
~Randy
Re: [PATCH v1 2/3] bus: mhi: core: Introduce debugfs entries for MHI
Quoted 20 lines · Randy Dunlap
Quoted 6 lines · Bhaumik Bhatt
drivers/bus/mhi/Kconfig +0
-0@@ -12,3 +12,11 @@ config MHI_BUS communication protocol used by the host processors to controldrivers/bus/mhi/Kconfig config MHI_BUS · line 22
Quoted 10 lines
drivers/bus/mhi/Kconfig +8
-0and communicate with modem devices over a high speed peripheral bus or shared memory. + +config MHI_BUS_DEBUG + bool "Debugfs support for the MHI bus" + depends on MHI_BUS && DEBUG_FS + help + Enable debugfs support for use with the MHI transport. Allows + reading and/or modifying some values within the MHI controller + for debug and test purposes.from
Documentation/process/coding-style.rst:
Quoted 6 lines
"""For all of the Kconfig* configuration files throughout the source tree, the indentation is somewhat different. Lines under a ``config`` definition are indented with one tab, while help text is indented an additional two spaces."""
Several lines above use spaces instead of one tab...
Thank you for pointing out. I will fix this.
PATCH 3/3 bus: mhi: core: Introduce sysfs entries for MHI
In reply to Bhaumik BhattIntroduce sysfs entries to enable userspace clients the ability to read the serial number and the OEM PK Hash values obtained from BHI. OEMs need to read these device-specific hardware information values through userspace for factory testing purposes and cannot be exposed via degbufs as it may remain disabled for performance reasons. Also, update the documentation for ABI to include these entries.
--- Documentation/ABI/stable/sysfs-bus-mhi | 21 ++++++++++++++ MAINTAINERS | 1 + drivers/bus/mhi/core/init.c | 53 ++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-bus-mhi
Documentation/ABI/stable/sysfs-bus-mhi new file +21 -0
@@ -0,0 +1,21 @@ +What: /sys/bus/mhi/devices/.../serialnumber +Date: Aug 2020 +KernelVersion: 5.10 +Contact: Bhaumik Bhatt <[email protected]> +Description: The file holds the serial number of the client device obtained + using a BHI (Boot Host Interface) register read after at least + one attempt to power up the device has been done. If read + without having the device power on at least once, the file will + read all 0's. +Users: Any userspace application or clients interested in device info. + +What: /sys/bus/mhi/devices/.../oem_pk_hash +Date: Aug 2020 +KernelVersion: 5.10 +Contact: Bhaumik Bhatt <[email protected]> +Description: The file holds the OEM PK Hash value of the endpoint device + obtained using a BHI (Boot Host Interface) register read after + at least one attempt to power up the device has been done. If + read without having the device power on at least once, the file + will read all 0's. +Users: Any userspace application or clients interested in device info.
MAINTAINERS +1 -0
@@ -11323,6 +11323,7 @@ M: Hemant Kumar <[email protected]> L: [email protected] S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git +F: Documentation/ABI/stable/sysfs-bus-mhi F: Documentation/mhi/ F: drivers/bus/mhi/ F: include/linux/mhi.h
drivers/bus/mhi/core/init.c +53 -0
71 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project