Deleted Added
full compact
axp209.c (295658) axp209.c (300421)
1/*-
2 * Copyright (c) 2015 Emmanuel Vadot <manu@bidouilliste.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2015 Emmanuel Vadot <manu@bidouilliste.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/arm/allwinner/axp209.c 295658 2016-02-16 11:51:54Z andrew $");
28__FBSDID("$FreeBSD: head/sys/arm/allwinner/axp209.c 300421 2016-05-22 13:58:32Z loos $");
29/*
30* X-Power AXP209 PMU for Allwinner SoCs
31*/
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/eventhandler.h>
35#include <sys/kernel.h>
36#include <sys/module.h>

--- 27 unchanged lines hidden (view full) ---

64#define AXP209_SHUTBAT_SHUTDOWN 0x80
65
66/* Temperature monitor */
67#define AXP209_TEMPMON 0x5e
68#define AXP209_TEMPMON_H(a) ((a) << 4)
69#define AXP209_TEMPMON_L(a) ((a) & 0xf)
70#define AXP209_TEMPMON_MIN 1447 /* -144.7C */
71
29/*
30* X-Power AXP209 PMU for Allwinner SoCs
31*/
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/eventhandler.h>
35#include <sys/kernel.h>
36#include <sys/module.h>

--- 27 unchanged lines hidden (view full) ---

64#define AXP209_SHUTBAT_SHUTDOWN 0x80
65
66/* Temperature monitor */
67#define AXP209_TEMPMON 0x5e
68#define AXP209_TEMPMON_H(a) ((a) << 4)
69#define AXP209_TEMPMON_L(a) ((a) & 0xf)
70#define AXP209_TEMPMON_MIN 1447 /* -144.7C */
71
72#define AXP209_0C_TO_K 2732
72#define AXP209_0C_TO_K 2731
73
74struct axp209_softc {
75 uint32_t addr;
76 struct intr_config_hook enum_hook;
77};
78
79enum axp209_sensor {
80 AXP209_TEMP

--- 146 unchanged lines hidden ---
73
74struct axp209_softc {
75 uint32_t addr;
76 struct intr_config_hook enum_hook;
77};
78
79enum axp209_sensor {
80 AXP209_TEMP

--- 146 unchanged lines hidden ---