Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'regulator-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
"Two fixes here, one from Johan which fixes error handling when we
attempt to create duplicate debugfs files and one for an incorrect
specification of ramp_delay with the rtq2208"

* tag 'regulator-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: core: fix debugfs creation regression
regulator: rtq2208: Fix the BUCK ramp_delay range to maximum of 16mVstep/us

+19 -15
+16 -11
drivers/regulator/core.c
··· 1911 1911 } 1912 1912 } 1913 1913 1914 - if (err != -EEXIST) 1914 + if (err != -EEXIST) { 1915 1915 regulator->debugfs = debugfs_create_dir(supply_name, rdev->debugfs); 1916 - if (IS_ERR(regulator->debugfs)) 1917 - rdev_dbg(rdev, "Failed to create debugfs directory\n"); 1916 + if (IS_ERR(regulator->debugfs)) { 1917 + rdev_dbg(rdev, "Failed to create debugfs directory\n"); 1918 + regulator->debugfs = NULL; 1919 + } 1920 + } 1918 1921 1919 - debugfs_create_u32("uA_load", 0444, regulator->debugfs, 1920 - &regulator->uA_load); 1921 - debugfs_create_u32("min_uV", 0444, regulator->debugfs, 1922 - &regulator->voltage[PM_SUSPEND_ON].min_uV); 1923 - debugfs_create_u32("max_uV", 0444, regulator->debugfs, 1924 - &regulator->voltage[PM_SUSPEND_ON].max_uV); 1925 - debugfs_create_file("constraint_flags", 0444, regulator->debugfs, 1926 - regulator, &constraint_flags_fops); 1922 + if (regulator->debugfs) { 1923 + debugfs_create_u32("uA_load", 0444, regulator->debugfs, 1924 + &regulator->uA_load); 1925 + debugfs_create_u32("min_uV", 0444, regulator->debugfs, 1926 + &regulator->voltage[PM_SUSPEND_ON].min_uV); 1927 + debugfs_create_u32("max_uV", 0444, regulator->debugfs, 1928 + &regulator->voltage[PM_SUSPEND_ON].max_uV); 1929 + debugfs_create_file("constraint_flags", 0444, regulator->debugfs, 1930 + regulator, &constraint_flags_fops); 1931 + } 1927 1932 1928 1933 /* 1929 1934 * Check now if the regulator is an always on regulator - if
+3 -4
drivers/regulator/rtq2208-regulator.c
··· 48 48 49 49 /* Value */ 50 50 #define RTQ2208_RAMP_VALUE_MIN_uV 500 51 - #define RTQ2208_RAMP_VALUE_MAX_uV 64000 51 + #define RTQ2208_RAMP_VALUE_MAX_uV 16000 52 52 53 53 #define RTQ2208_BUCK_MASK(uv_irq, ov_irq) (1 << ((uv_irq) % 8) | 1 << ((ov_irq) % 8)) 54 54 ··· 142 142 * Because the relation of seleltion and value is like that 143 143 * 144 144 * seletion: value 145 - * 000: 64mv 146 - * 001: 32mv 145 + * 010: 16mv 147 146 * ... 148 147 * 111: 0.5mv 149 148 * 150 - * For example, if I would like to select 64mv, the fls(ramp_delay) - 1 will be 0b111, 149 + * For example, if I would like to select 16mv, the fls(ramp_delay) - 1 will be 0b010, 151 150 * and I need to use 0b111 - sel to do the shifting 152 151 */ 153 152