Project

General

Profile

Actions

Issue #2157

open

Add charging mode at poweroff when a cable is plugged

Added by Denis 'GNUtoo' Carikli over 3 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
11/04/2020
Due date:
% Done:

0%

Estimated time:
Resolution:
Device:
Unknown
Grant:
Type of work:
C programming
Actions #1

Updated by Denis 'GNUtoo' Carikli over 3 years ago

in sys-reboot.c in kernel_samsung_smdk4412 we have:

static void sec_power_off(void)
{
                [...]
                /* Check reboot charging */
                if (is_cable_attached || (poweroff_try >= 5)) {
                        pr_emerg
                            ("%s: charger connected(%d) or power" 
                             "off failed(%d), reboot!\n",
                             __func__, is_cable_attached, poweroff_try);
                        writel(0x0, S5P_INFORM2);       /* To enter LP charging */

                        flush_cache_all();
                        outer_flush_all();
                        arch_reset(0, 0);

                        pr_emerg("%s: waiting for reboot\n", __func__);
                        while (1);
                }
                [...]

To enable charging while "not booted" we need to implement that in the kernel_replicant_linux too.

Actions #2

Updated by _I3^ RELATIVISM about 3 years ago

  • Type of work C programming added
Actions

Also available in: Atom PDF