I have to say, this code is very painful reading. Every single bit I've
read so far is circular code in nature. I've yet to find a bit of code that
actually does anything obvious. Meaning, someone has attempted to be clever
by creating function, after function that calls yet more functions written
by the same author.

So basically you spend all day sifting through worthless code, and
potentially never being the wiser . . . Unless these chained functions
don't go too deep, and you're actually able to make snese of the code.
Before you forget why you started reading the code to begin with . ..

On Sun, Apr 17, 2016 at 3:53 PM, John Syne <[email protected]> wrote:

> I guess I should have read your explanation more closely. OK the interrupt
> routing issues a key input which replicates the power button being pushed.
> Not sure if this is what you want, or if you want to stop this from
> happening when when the AC power is removed.
>
> Regards,
> John
>
>
>
>
> On Apr 17, 2016, at 2:37 PM, William Hermans <[email protected]> wrote:
>
> So no one has any idea ? I'm looking for the module, that traps power
> events, and shuts down the BBB. All I need is a file name. It's pretty hard
> making sense of the mess that is /drivers/mfd, and the documentation does
> not seem to be helpful either.
>
> Documentation/power/regulator/charger-management.txt does not exist in my
> repo, nor in Linus' repo either. There is a similar file, but nothing
> apparently related to our hardware. Passed that, most of the stuff int the
> Documentation/power directory seems to be related to ACPI, which again, has
> nothing to do with even our architecture . . .
>
> On Sat, Apr 16, 2016 at 9:09 PM, William Hermans <[email protected]>
> wrote:
>
>> So I've only found this so far.
>> https://github.com/torvalds/linux/blob/master/drivers/mfd/tps65217.c#L222-#L229
>>
>> Which I pretty much had already figured out this morning right after I
>> posted. Pretty much, the PMIC sees a condition, that needs attention. It
>> writes some values to registers that relate to the given condition, and
>> then sends an NMI out to the am335x processor. Where the am335x processor
>> immediately picks up that the PMIC needs attention( the whole point of an
>> NMI ), reads the register values out of the PMIC to determine what action
>> needs to be taken. Which in the case of the power button being pressed. the
>> am335x issues a shutdown now -h ( Linux ) Which looking at the code,
>> actually seems like the LKM is actually writing to the PMIC registers to do
>> this ?!
>>
>> Anyway, no idea how a power good condition is being acted on *still*.
>> Meaning, no idea how when a battery is connected, when the external power
>> somehow goes missing. How that particular shutdown is happening, and from
>> where.
>>
>> On Sat, Apr 16, 2016 at 4:32 PM, John Syne <[email protected]> wrote:
>>
>>> I’m not sure, but best place to look would be
>>> Documentation/power/regulator/charger-management.txt. I believe the PMIC
>>> issues event when AC is removed.
>>>
>>> Regards,
>>> John
>>>
>>>
>>>
>>>
>>> On Apr 16, 2016, at 12:59 PM, William Hermans <[email protected]> wrote:
>>>
>>> Also from what I've read this behavior is different between console and
>>> LXDE images. So if this is true I understand that. I do not want the
>>> behaviors that each of these images provides, but wish to customize my own.
>>>
>>>
>>> On Sat, Apr 16, 2016 at 12:55 PM, William Hermans <[email protected]>
>>> wrote:
>>>
>>>> When a battery is connected to a beaglebone black, how does the
>>>> software know to issue a shutdown when power is no longer coming in ? More
>>>> specifically I'm interested in which file / script performs this action,
>>>> and what mechanism triggers this behavior.
>>>>
>>>> My intentions are to modify / customize what actually happens when
>>>> power to the board is battery only.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> For more options, visit http://beagleboard.org/discuss
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "BeagleBoard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> --
>>> For more options, visit http://beagleboard.org/discuss
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> For more options, visit http://beagleboard.org/discuss
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beagleboard/F27E94CA-369F-4E5D-8555-EEAD3B034C28%40gmail.com
>>> <https://groups.google.com/d/msgid/beagleboard/F27E94CA-369F-4E5D-8555-EEAD3B034C28%40gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CALHSORqNNeWN9uW_WDsTQC%2BNuArTq%2BtjGMVO5a%2Be-S6cyDk21w%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CALHSORqNNeWN9uW_WDsTQC%2BNuArTq%2BtjGMVO5a%2Be-S6cyDk21w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/8D1C78E9-A070-4BEF-8BF5-D274B18EC1C0%40gmail.com
> <https://groups.google.com/d/msgid/beagleboard/8D1C78E9-A070-4BEF-8BF5-D274B18EC1C0%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrOtA5TW7y%3DyGwuXQVe2h9o%3DNB4c62CxL%2BxDRM7dqEpAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to