/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * max8952.h - Voltage regulation for the Maxim 8952 * * Copyright (C) 2010 Samsung Electrnoics * MyungJoo Ham */ #ifndef REGULATOR_MAX8952 #define REGULATOR_MAX8952 #include enum { MAX8952_DVS_MODE0, MAX8952_DVS_MODE1, MAX8952_DVS_MODE2, MAX8952_DVS_MODE3, }; enum { MAX8952_DVS_770mV = 0, MAX8952_DVS_780mV, MAX8952_DVS_790mV, MAX8952_DVS_800mV, MAX8952_DVS_810mV, MAX8952_DVS_820mV, MAX8952_DVS_830mV, MAX8952_DVS_840mV, MAX8952_DVS_850mV, MAX8952_DVS_860mV, MAX8952_DVS_870mV, MAX8952_DVS_880mV, MAX8952_DVS_890mV, MAX8952_DVS_900mV, MAX8952_DVS_910mV, MAX8952_DVS_920mV, MAX8952_DVS_930mV, MAX8952_DVS_940mV, MAX8952_DVS_950mV, MAX8952_DVS_960mV, MAX8952_DVS_970mV, MAX8952_DVS_980mV, MAX8952_DVS_990mV, MAX8952_DVS_1000mV, MAX8952_DVS_1010mV, MAX8952_DVS_1020mV, MAX8952_DVS_1030mV, MAX8952_DVS_1040mV, MAX8952_DVS_1050mV, MAX8952_DVS_1060mV, MAX8952_DVS_1070mV, MAX8952_DVS_1080mV, MAX8952_DVS_1090mV, MAX8952_DVS_1100mV, MAX8952_DVS_1110mV, MAX8952_DVS_1120mV, MAX8952_DVS_1130mV, MAX8952_DVS_1140mV, MAX8952_DVS_1150mV, MAX8952_DVS_1160mV, MAX8952_DVS_1170mV, MAX8952_DVS_1180mV, MAX8952_DVS_1190mV, MAX8952_DVS_1200mV, MAX8952_DVS_1210mV, MAX8952_DVS_1220mV, MAX8952_DVS_1230mV, MAX8952_DVS_1240mV, MAX8952_DVS_1250mV, MAX8952_DVS_1260mV, MAX8952_DVS_1270mV, MAX8952_DVS_1280mV, MAX8952_DVS_1290mV, MAX8952_DVS_1300mV, MAX8952_DVS_1310mV, MAX8952_DVS_1320mV, MAX8952_DVS_1330mV, MAX8952_DVS_1340mV, MAX8952_DVS_1350mV, MAX8952_DVS_1360mV, MAX8952_DVS_1370mV, MAX8952_DVS_1380mV, MAX8952_DVS_1390mV, MAX8952_DVS_1400mV, }; enum { MAX8952_SYNC_FREQ_26MHZ, /* Default */ MAX8952_SYNC_FREQ_13MHZ, MAX8952_SYNC_FREQ_19_2MHZ, }; enum { MAX8952_RAMP_32mV_us = 0, /* Default */ MAX8952_RAMP_16mV_us, MAX8952_RAMP_8mV_us, MAX8952_RAMP_4mV_us, MAX8952_RAMP_2mV_us, MAX8952_RAMP_1mV_us, MAX8952_RAMP_0_5mV_us, MAX8952_RAMP_0_25mV_us, }; #define MAX8952_NUM_DVS_MODE 4 struct max8952_platform_data { u32 default_mode; u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ u32 sync_freq; u32 ramp_speed; struct regulator_init_data *reg_data; }; #endif /* REGULATOR_MAX8952 */ ption> Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-31.gitattributes: set diff driver for Rust source code filesMiguel Ojeda
Git supports a builtin Rust diff driver [1] since v2.23.0 (2019). It improves the choice of hunk headers in some cases, such as diffs within methods, since those are indented in Rust within an `impl` block, and therefore the default diff driver would pick the outer `impl` block instead (rather than the method where the changed code is). For instance, with the default diff driver: @@ -455,6 +455,8 @@ impl fmt::Write for RawFormatter { // Amount that we can copy. `saturating_sub` ensures we get 0 if `pos` goes past `end`. let len_to_copy = core::cmp::min(pos_new, self.end).saturating_sub(self.pos); + test_diff_driver(); + if len_to_copy > 0 { // SAFETY: If `len_to_copy` is non-zero, then we know `pos` has not gone past `end` // yet, so it is valid for write per the type invariants. With the Rust diff driver: @@ -455,6 +455,8 @@ fn write_str(&mut self, s: &str) -> fmt::Result { // Amount that we can copy. `saturating_sub` ensures we get 0 if `pos` goes past `end`. let len_to_copy = core::cmp::min(pos_new, self.end).saturating_sub(self.pos); + test_diff_driver(); + if len_to_copy > 0 { // SAFETY: If `len_to_copy` is non-zero, then we know `pos` has not gone past `end` // yet, so it is valid for write per the type invariants. Thus set the `rust` diff driver for `*.rs` source files. The Rust repository also does so since 2020 [2]. Link: https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header [1] Link: https://github.com/rust-lang/rust/pull/78882 [2] Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20230418233048.335281-1-ojeda@kernel.org [ Added link to Rust repository ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-02-26.gitattributes: use 'dts' diff driver for *.dtso filesMasahiro Yamada
Now we have the third extension for DT source files (overlay). Give the diff=dts attribute to *.dtso as well. While I was here, I merged *.c and *.o into *.[ch] and added the SPDX-License-Identifier. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>