File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3534,11 +3534,11 @@ static int pmbus_init_debugfs(struct i2c_client *client,
3534
3534
3535
3535
/*
3536
3536
* Allocate the max possible entries we need.
3537
- * 6 entries device-specific
3537
+ * 7 entries device-specific
3538
3538
* 10 entries page-specific
3539
3539
*/
3540
3540
entries = devm_kcalloc (data -> dev ,
3541
- 6 + data -> info -> pages * 10 , sizeof (* entries ),
3541
+ 7 + data -> info -> pages * 10 , sizeof (* entries ),
3542
3542
GFP_KERNEL );
3543
3543
if (!entries )
3544
3544
return - ENOMEM ;
@@ -3551,6 +3551,15 @@ static int pmbus_init_debugfs(struct i2c_client *client,
3551
3551
* assume that values of the following registers are the same for all
3552
3552
* pages and report values only for page 0.
3553
3553
*/
3554
+ if (pmbus_check_byte_register (client , 0 , PMBUS_REVISION )) {
3555
+ entries [idx ].client = client ;
3556
+ entries [idx ].page = 0 ;
3557
+ entries [idx ].reg = PMBUS_REVISION ;
3558
+ debugfs_create_file ("revision" , 0444 , data -> debugfs ,
3559
+ & entries [idx ++ ],
3560
+ & pmbus_debugfs_ops );
3561
+ }
3562
+
3554
3563
if (pmbus_check_block_register (client , 0 , PMBUS_MFR_ID )) {
3555
3564
entries [idx ].client = client ;
3556
3565
entries [idx ].page = 0 ;
You can’t perform that action at this time.
0 commit comments