blob: f74e6fe0c27686e732ad9ebe7c8f12c39c86de5d [file] [log] [blame]
Linus Nielsen Feltzing7cafe7a2002-07-04 16:09:23 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
Linus Nielsen Feltzing7cafe7a2002-07-04 16:09:23 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef _POWER_H_
22#define _POWER_H_
23
Jens Arnold0dd1f8e2006-06-06 22:23:52 +000024#if CONFIG_CHARGING == CHARGING_CONTROL
Heikki Hannikainen3f809e72002-08-06 10:50:50 +000025extern bool charger_enabled;
Hristo Kovachev14cfc652006-02-07 14:46:03 +000026void charger_enable(bool on);
Heikki Hannikainen3f809e72002-08-06 10:50:50 +000027#endif
28
Jonathan Gordon9a6f4192007-02-18 05:32:06 +000029#if CONFIG_CHARGING
Linus Nielsen Feltzing7cafe7a2002-07-04 16:09:23 +000030bool charger_inserted(void);
Hristo Kovachev14cfc652006-02-07 14:46:03 +000031#endif
32
Linus Nielsen Feltzing4edf8ae2002-07-05 07:10:22 +000033void power_off(void);
Hristo Kovachev14cfc652006-02-07 14:46:03 +000034void ide_power_enable(bool on);
35
Jens Arnold0dd1f8e2006-06-06 22:23:52 +000036# if CONFIG_CHARGING == CHARGING_MONITOR
Hristo Kovachev14cfc652006-02-07 14:46:03 +000037bool charging_state(void);
38# endif
39
Nils Wallméniusf28da1a2007-08-12 19:49:03 +000040#ifndef SIMULATOR
41
42void power_init(void);
43
Hristo Kovachev14cfc652006-02-07 14:46:03 +000044bool ide_powered(void);
45#endif
Linus Nielsen Feltzing7cafe7a2002-07-04 16:09:23 +000046
Linus Nielsen Feltzinge6bc6c42005-04-11 11:17:31 +000047#ifdef HAVE_SPDIF_POWER
48void spdif_power_enable(bool on);
Michael Sevakiscc50c142006-11-13 23:21:54 +000049bool spdif_powered(void);
Linus Nielsen Feltzinge6bc6c42005-04-11 11:17:31 +000050#endif
51
Jens Arnoldc6522182007-02-18 08:46:12 +000052#if CONFIG_TUNER
Jens Arnold8a177342007-08-14 22:06:23 +000053bool tuner_power(bool status);
Jörg Hohensohn91f93502004-10-17 08:53:18 +000054#endif
55
Linus Nielsen Feltzing7cafe7a2002-07-04 16:09:23 +000056#endif