summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2017-01-23 10:54:52 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2017-01-23 10:54:52 +0000
commit7cdc950437c26b790554f7d0d3da037e90cf6dae (patch)
tree772334de3516f674831cc48e186524ffe974b814 /sys/arch/loongson
parent39b9b579d6f7062d86687293a028039f20b02907 (diff)
Nuke extraneous whitespace and tabs.
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r--sys/arch/loongson/dev/kb3310.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/sys/arch/loongson/dev/kb3310.c b/sys/arch/loongson/dev/kb3310.c
index 044eccef39e..c7e1cc813a6 100644
--- a/sys/arch/loongson/dev/kb3310.c
+++ b/sys/arch/loongson/dev/kb3310.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kb3310.c,v 1.22 2016/12/05 15:04:15 fcambus Exp $ */
+/* $OpenBSD: kb3310.c,v 1.23 2017/01/23 10:54:51 fcambus Exp $ */
/*
* Copyright (c) 2010 Otto Moerbeek <otto@drijf.net>
*
@@ -56,7 +56,7 @@ struct cfdriver ykbec_cd = {
#define IO_YKBECSIZE 0x3
static const struct {
- const char *desc;
+ const char *desc;
int type;
} ykbec_table[] = {
#define YKBEC_FAN 0
@@ -66,13 +66,13 @@ static const struct {
#define YKBEC_FCAP 2
{ "Battery full charge capacity", SENSOR_AMPHOUR },
#define YKBEC_BCURRENT 3
- { "Battery current", SENSOR_AMPS },
+ { "Battery current", SENSOR_AMPS },
#define YKBEC_BVOLT 4
{ "Battery voltage", SENSOR_VOLTS_DC },
#define YKBEC_BTEMP 5
{ "Battery temperature", SENSOR_TEMP },
#define YKBEC_CAP 6
- { "Battery capacity", SENSOR_PERCENT },
+ { "Battery capacity", SENSOR_PERCENT },
#define YKBEC_CHARGING 7
{ "Battery charging", SENSOR_INDICATOR },
#define YKBEC_AC 8
@@ -182,8 +182,8 @@ ykbec_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
for (i = 0; i < YKBEC_NSENSORS; i++) {
- sc->sc_sensor[i].type = ykbec_table[i].type;
- if (ykbec_table[i].desc)
+ sc->sc_sensor[i].type = ykbec_table[i].type;
+ if (ykbec_table[i].desc)
strlcpy(sc->sc_sensor[i].desc, ykbec_table[i].desc,
sizeof(sc->sc_sensor[i].desc));
sensor_attach(&sc->sc_sensordev, &sc->sc_sensor[i]);
@@ -330,7 +330,7 @@ ykbec_print_bat_info(struct ykbec_softc *sc)
printf("absent");
return;
}
-
+
count = ykbec_read(sc, REG_BAT_CELL_COUNT);
dvolt = ykbec_read16(sc, REG_DESIGN_VOL_HIGH);
dcap = ykbec_read16(sc, REG_DESIGN_CAP_HIGH);
@@ -430,22 +430,21 @@ ykbec_refresh(void *arg)
ykbec_apmdata.minutes_left = fullcap / current;
}
- if (old.ac_state != ykbec_apmdata.ac_state)
+ if (old.ac_state != ykbec_apmdata.ac_state)
apm_record_event(APM_POWER_CHANGE, "AC power",
ykbec_apmdata.ac_state ? "restored" : "lost");
- if (old.battery_state != ykbec_apmdata.battery_state)
+ if (old.battery_state != ykbec_apmdata.battery_state)
apm_record_event(APM_POWER_CHANGE, "battery",
BATTERY_STRING(ykbec_apmdata.battery_state));
#endif
}
-
#if NAPM > 0
int
ykbec_apminfo(struct apm_power_info *info)
{
- bcopy(&ykbec_apmdata, info, sizeof(struct apm_power_info));
- return 0;
+ bcopy(&ykbec_apmdata, info, sizeof(struct apm_power_info));
+ return 0;
}
int
@@ -461,9 +460,9 @@ ykbec_suspend()
/* USB */
DPRINTF(("USB\n"));
- ykbec_write(sc, REG_USB0, USB_FLAG_OFF);
- ykbec_write(sc, REG_USB1, USB_FLAG_OFF);
- ykbec_write(sc, REG_USB2, USB_FLAG_OFF);
+ ykbec_write(sc, REG_USB0, USB_FLAG_OFF);
+ ykbec_write(sc, REG_USB1, USB_FLAG_OFF);
+ ykbec_write(sc, REG_USB2, USB_FLAG_OFF);
/* EC */
DPRINTF(("REG_PMUCFG\n"));
@@ -508,9 +507,9 @@ ykbec_resume()
/* USB */
DPRINTF(("USB\n"));
- ykbec_write(sc, REG_USB0, USB_FLAG_ON);
- ykbec_write(sc, REG_USB1, USB_FLAG_ON);
- ykbec_write(sc, REG_USB2, USB_FLAG_ON);
+ ykbec_write(sc, REG_USB0, USB_FLAG_ON);
+ ykbec_write(sc, REG_USB1, USB_FLAG_ON);
+ ykbec_write(sc, REG_USB2, USB_FLAG_ON);
ykbec_refresh(sc);