History log of /linux/drivers/power/supply/bq24190_charger.c (Results 1 – 25 of 394)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a23e1966 15-Jul-2024 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Merge branch 'next' into for-linus

Prepare input updates for 6.11 merge window.


Revision tags: v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2
# 6f47c7ae 28-May-2024 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Merge tag 'v6.9' into next

Sync up with the mainline to bring in the new cleanup API.


Revision tags: v6.10-rc1
# 60a2f25d 16-May-2024 Tvrtko Ursulin <tursulin@ursulin.net>

Merge drm/drm-next into drm-intel-gt-next

Some display refactoring patches are needed in order to allow conflict-
less merging.

Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>


Revision tags: v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7
# 06d07429 29-Feb-2024 Jani Nikula <jani.nikula@intel.com>

Merge drm/drm-next into drm-intel-next

Sync to get the drm_printer changes to drm-intel-next.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>


# 2e21dee6 13-Mar-2024 Jiri Kosina <jkosina@suse.com>

Merge branch 'for-6.9/amd-sfh' into for-linus

- assorted fixes and optimizations for amd-sfh (Basavaraj Natikar)

Signed-off-by: Jiri Kosina <jkosina@suse.com>


Revision tags: v6.8-rc6, v6.8-rc5
# 41c177cf 11-Feb-2024 Rob Clark <robdclark@chromium.org>

Merge tag 'drm-misc-next-2024-02-08' into msm-next

Merge the drm-misc tree to uprev MSM CI.

Signed-off-by: Rob Clark <robdclark@chromium.org>


Revision tags: v6.8-rc4, v6.8-rc3
# 4db102dc 29-Jan-2024 Maxime Ripard <mripard@kernel.org>

Merge drm/drm-next into drm-misc-next

Kickstart 6.9 development cycle.

Signed-off-by: Maxime Ripard <mripard@kernel.org>


Revision tags: v6.8-rc2
# be3382ec 23-Jan-2024 Lucas De Marchi <lucas.demarchi@intel.com>

Merge drm/drm-next into drm-xe-next

Sync to v6.8-rc1.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>


Revision tags: v6.8-rc1
# 0ea5c948 15-Jan-2024 Jani Nikula <jani.nikula@intel.com>

Merge drm/drm-next into drm-intel-next

Backmerge to bring Xe driver to drm-intel-next.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>


# 03c11eb3 14-Feb-2024 Ingo Molnar <mingo@kernel.org>

Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch

Conflicts:
arch/x86/include/asm/percpu.h
arch/x86/include/asm/text-patching.h

Signed-off-by: Ingo Molnar <mingo@k

Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch

Conflicts:
arch/x86/include/asm/percpu.h
arch/x86/include/asm/text-patching.h

Signed-off-by: Ingo Molnar <mingo@kernel.org>

show more ...


# 42ac0be1 26-Jan-2024 Ingo Molnar <mingo@kernel.org>

Merge branch 'linus' into x86/mm, to refresh the branch and pick up fixes

Signed-off-by: Ingo Molnar <mingo@kernel.org>


# 06f609b3 25-Jan-2024 Jakub Kicinski <kuba@kernel.org>

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Cross-merge networking fixes after downstream PR.

No conflicts or adjacent changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# f0b7a0d1 23-Jan-2024 Andrew Morton <akpm@linux-foundation.org>

Merge branch 'master' into mm-hotfixes-stable


# cf79f291 22-Jan-2024 Maxime Ripard <mripard@kernel.org>

Merge v6.8-rc1 into drm-misc-fixes

Let's kickstart the 6.8 fix cycle.

Signed-off-by: Maxime Ripard <mripard@kernel.org>


# ab1e2d0f 19-Jan-2024 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
"New features:
- bq24190: Add support

Merge tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
"New features:
- bq24190: Add support for BQ24296 charger

Cleanups:
- all reset drivers: Stop using module_platform_driver_probe()
- gpio-restart: use devm_register_sys_off_handler
- pwr-mlxbf: support graceful reboot
- cw2015: correct time_to_empty units
- qcom-battmgr: Fix driver initialization sequence
- bq27xxx: Start/Stop delayed work in suspend/resume
- minor cleanups and fixes"

* tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (33 commits)
power: supply: bq24190_charger: Fix "initializer element is not constant" error
power: supply: bq24190_charger: Add support for BQ24296
dt-bindings: power: supply: bq24190: Add BQ24296 compatible
dt-bindings: power: reset: xilinx: Rename node names in examples
power: supply: qcom_battmgr: Register the power supplies after PDR is up
dt-bindings: power: reset: qcom-pon: fix inconsistent example
power: supply: Fix null pointer dereference in smb2_probe
power: reset: at91: Drop '__init' from at91_wakeup_status()
power: supply: Use multiple MODULE_AUTHOR statements
power: supply: Fix indentation and some other warnings
power: reset: gpio-restart: Use devm_register_sys_off_handler()
power: supply: bq256xx: fix some problem in bq256xx_hw_init
power: supply: cw2015: correct time_to_empty units in sysfs
power: reset: at91-sama5d2_shdwc: Convert to platform remove callback returning void
power: reset: at91-reset: Convert to platform remove callback returning void
power: reset: tps65086-restart: Convert to platform remove callback returning void
power: reset: syscon-poweroff: Convert to platform remove callback returning void
power: reset: rmobile-reset: Convert to platform remove callback returning void
power: reset: restart-poweroff: Convert to platform remove callback returning void
power: reset: regulator-poweroff: Convert to platform remove callback returning void
...

show more ...


Revision tags: v6.7
# 17d49b7e 03-Jan-2024 Nathan Chancellor <nathan@kernel.org>

power: supply: bq24190_charger: Fix "initializer element is not constant" error

When building with a version of GCC prior to 8.x, there is an error
around non-constant initializer elements:

drive

power: supply: bq24190_charger: Fix "initializer element is not constant" error

When building with a version of GCC prior to 8.x, there is an error
around non-constant initializer elements:

drivers/power/supply/bq24190_charger.c:1978:16: error: initializer element is not constant
.vbus_desc = bq24190_vbus_desc,
^~~~~~~~~~~~~~~~~
drivers/power/supply/bq24190_charger.c:1978:16: note: (near initialization for 'bq24190_chip_info_tbl[0].vbus_desc')
drivers/power/supply/bq24190_charger.c:1989:16: error: initializer element is not constant
.vbus_desc = bq24190_vbus_desc,
^~~~~~~~~~~~~~~~~
drivers/power/supply/bq24190_charger.c:1989:16: note: (near initialization for 'bq24190_chip_info_tbl[1].vbus_desc')
drivers/power/supply/bq24190_charger.c:2000:16: error: initializer element is not constant
.vbus_desc = bq24190_vbus_desc,
^~~~~~~~~~~~~~~~~
drivers/power/supply/bq24190_charger.c:2000:16: note: (near initialization for 'bq24190_chip_info_tbl[2].vbus_desc')
drivers/power/supply/bq24190_charger.c:2011:16: error: initializer element is not constant
.vbus_desc = bq24190_vbus_desc,
^~~~~~~~~~~~~~~~~
drivers/power/supply/bq24190_charger.c:2011:16: note: (near initialization for 'bq24190_chip_info_tbl[3].vbus_desc')
drivers/power/supply/bq24190_charger.c:2022:16: error: initializer element is not constant
.vbus_desc = bq24296_vbus_desc,
^~~~~~~~~~~~~~~~~
drivers/power/supply/bq24190_charger.c:2022:16: note: (near initialization for 'bq24190_chip_info_tbl[4].vbus_desc')

Clang versions prior to 17.x show a similar error:

drivers/power/supply/bq24190_charger.c:1978:16: error: initializer element is not a compile-time constant
.vbus_desc = bq24190_vbus_desc,
^~~~~~~~~~~~~~~~~
1 error generated.

Newer compilers have decided to accept these structures as compile time
constants as an extension. To resolve this issue for all supported
compilers, change the vbus_desc member in 'struct bq24190_chip_info' to
a pointer, as it is only ever passed by reference anyways, and adjust
the assignments accordingly.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1973
Fixes: b150a703b56f ("power: supply: bq24190_charger: Add support for BQ24296")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240103-fix-bq24190_charger-vbus_desc-non-const-v1-1-115ddf798c70@kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

show more ...


Revision tags: v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5
# b150a703 08-Dec-2023 Hermes Zhang <chenhuiz@axis.com>

power: supply: bq24190_charger: Add support for BQ24296

The BQ24296 is most similar to the BQ24196, but the:
1. OTG config is split from CHG config (REG01)
2. ICHG (Fast Charge Current limit) range

power: supply: bq24190_charger: Add support for BQ24296

The BQ24296 is most similar to the BQ24196, but the:
1. OTG config is split from CHG config (REG01)
2. ICHG (Fast Charge Current limit) range is smaller (<=3008mA)
3. NTC fault is simplified to 2 bits

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
Link: https://lore.kernel.org/r/20231208034708.1248389-3-Hermes.Zhang@axis.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

show more ...


# ab1c2470 19-Dec-2023 Arnaldo Carvalho de Melo <acme@redhat.com>

Merge remote-tracking branch 'torvalds/master' into perf-tools-next

To pick up fixes that went thru perf-tools for v6.7 and to get in sync
with upstream to check for drift in the copies of headers,

Merge remote-tracking branch 'torvalds/master' into perf-tools-next

To pick up fixes that went thru perf-tools for v6.7 and to get in sync
with upstream to check for drift in the copies of headers, etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.7-rc4, v6.7-rc3, v6.7-rc2
# 3bf3e21c 15-Nov-2023 Maxime Ripard <mripard@kernel.org>

Merge drm/drm-next into drm-misc-next

Let's kickstart the v6.8 release cycle.

Signed-off-by: Maxime Ripard <mripard@kernel.org>


Revision tags: v6.7-rc1, v6.6
# a1c613ae 24-Oct-2023 Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Merge drm/drm-next into drm-intel-gt-next

Work that needs to land in drm-intel-gt-next depends on two patches only
present in drm-intel-next, absence of which is causing a merge conflict:

3b918f4

Merge drm/drm-next into drm-intel-gt-next

Work that needs to land in drm-intel-gt-next depends on two patches only
present in drm-intel-next, absence of which is causing a merge conflict:

3b918f4f0c8b ("drm/i915/pxp: Optimize GET_PARAM:PXP_STATUS")
ac765b7018f6 ("drm/i915/pxp/mtl: intel_pxp_init_hw needs runtime-pm inside pm-complete")

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

show more ...


# 5d2d4a9f 15-Nov-2023 Peter Zijlstra <peterz@infradead.org>

Merge branch 'tip/perf/urgent'

Avoid conflicts, base on fixes.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>


# cdd5b5a9 07-Nov-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Merge branch 'next' into for-linus

Prepare input updates for 6.7 merge window.


# f9ae1804 01-Nov-2023 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
"Core changes:
- propagate of_node to chi

Merge tag 'for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
"Core changes:
- propagate of_node to child device
- change from atomic to blocking notifier_call_chain

New drivers:
- pm8916 battery management system
- mm8013 fuel gauge

New features:
- maxim max17040: add temperature support
- gpio-poweroff: make priority configurable

Cleanups:
- simplify reset drivers using builtin_platform_driver()
- convert all platform drivers to remove_new callback
- replace all strncpy occurrences with strscpy
- started converting drivers to i2c_get_match_data()
- misc fixes and cleanups"

* tag 'for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (91 commits)
power: reset: vexpress: Use device_get_match_data()
power: supply: surface-charger: replace deprecated strncpy with strscpy
power: supply: surface_battery: replace deprecated strncpy with strscpy
power: supply: charger-manager: replace deprecated strncpy with strscpy
power: supply: bq25980: replace deprecated strncpy with strscpy
power: supply: bq256xx: replace deprecated strncpy with strscpy
power: supply: bq2515x: replace deprecated strncpy with strscpy
power: supply: bq24190_charger: replace deprecated strncpy with strscpy
power: supply: cpcap: Drop non-DT driver matching
power: reset: brcmstb: Depend on actual SoC dependencies
power: reset: gpio-poweroff: make sys handler priority configurable
dt-bindings: power: reset: gpio-poweroff: Add priority property
power: reset: gpio-poweroff: use sys-off handler API
power: reset: gpio-poweroff: use a struct to store the module variables
power: supply: rt5033_charger: Replace "&pdev->dev" by "charger->dev" in probe
power: supply: rt5033_charger: Simplify initialization of rt5033_charger_data
power: supply: rt5033_charger: Add cable detection and USB OTG supply
power: supply: core: remove opencoded string_lower()
dt-bindings: power: supply: sbs-manager: Add missing unevaluatedProperties on child node schemas
power: supply: mm8013: Fix an error checking issue in mm8013_checkdevice()
...

show more ...


Revision tags: v6.6-rc7
# b0009b8b 20-Oct-2023 Justin Stitt <justinstitt@google.com>

power: supply: bq24190_charger: replace deprecated strncpy with strscpy

strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less am

power: supply: bq24190_charger: replace deprecated strncpy with strscpy

strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

We expect bdi->model_name to be NUL-terminated based on its usage with
sysfs_emit and format strings:

val->strval is assigned to bdi->model_name in
bq24190_charger_get_property():
1186 | val->strval = bdi->model_name;

... then in power_supply_sysfs.c we use value.strval with a format string:
311 | ret = sysfs_emit(buf, "%s\n", value.strval);

we assigned value.strval via:
285 | ret = power_supply_get_property(psy, psp, &value);
... which invokes psy->desc->get_property():
1210 | return psy->desc->get_property(psy, psp, val);

with bq24190_charger_get_property():
1320 | static const struct power_supply_desc bq24190_charger_desc = {
...
1325 | .get_property = bq24190_charger_get_property,

Moreover, no NUL-padding is required as bdi is zero-allocated in
bq24190_charger.c:
1798 | bdi = devm_kzalloc(dev, sizeof(*bdi), GFP_KERNEL);

Considering the above, a suitable replacement is `strscpy` [2] due to
the fact that it guarantees NUL-termination on the destination buffer
without unnecessarily NUL-padding.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231020-strncpy-drivers-power-supply-bq24190_charger-c-v1-1-e896223cb795@google.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

show more ...


# a940daa5 17-Oct-2023 Thomas Gleixner <tglx@linutronix.de>

Merge branch 'linus' into smp/core

Pull in upstream to get the fixes so depending changes can be applied.


12345678910>>...16