Landry Breuil
a65fdfc156
trivial: move #includes
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:13 +00:00
Landry Breuil
20a3759ab9
openbsd: rename get_sensor() to get_sensordev() for the sake of clarity
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:12 +00:00
Landry Breuil
1017f7399b
openbsd: rename has_sensor() to get_sensor() and use it to grab the sensordev struct
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:09 +00:00
Landry Breuil
5e69186399
openbsd: add up_native_has_sensor() and use it in is_laptop()
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:07 +00:00
Landry Breuil
0580fed09a
trivial: ignore libupshared too
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:05 +00:00
Landry Breuil
7dda4cd660
-Wuninitialized needs -O
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:00 +00:00
Landry Breuil
d51953c305
openbsd: assign callbacks to ac/batt device class
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:57 +00:00
Landry Breuil
8e84a6dbb4
openbsd: rip of get_on_battery/get_low_battery/get_online from freebsd backend
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:55 +00:00
Landry Breuil
08d46e4b90
trivial: fix indent
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:51 +00:00
Landry Breuil
164ac63f8d
openbsd: time-to-empty is in seconds
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:49 +00:00
Landry Breuil
0d7b9fe1d5
trivial: silence warnings
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:48 +00:00
Landry Breuil
55408490d0
trivial: return NULL, shouldnt be reached anyway
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:26 +00:00
Landry Breuil
b03290f11d
openbsd: Declare prototypes for get_power_info/get_battery_state_value
...
Pass struct apm_power_info ptr as argument instead of returning it
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:24 +00:00
Landry Breuil
564d1c47ad
openbsd: cast NULL to void* to silence missing sentinel gcc warnings
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:23 +00:00
Landry Breuil
2533e75e77
openbsd: dont initialize props we wont likely set atm
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:22 +00:00
Landry Breuil
631869fdd5
openbsd: Update battery properties only if they really changed
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:20 +00:00
Landry Breuil
89c929d442
openbsd: update ac state only if state really changed
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:19 +00:00
Landry Breuil
c11e803058
openbsd: use g_debug instead of g_message, also log minutes_left
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:17 +00:00
Landry Breuil
d5b1d6d49f
openbsd: move batt/ac properties update to their own separate functions
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:15 +00:00
Landry Breuil
8d2844c51c
openbsd: No need for a delayed callback coldplugging devices
...
Coldplug them directly in up_backend_coldplug (only if is_laptop is true)
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:14 +00:00
Landry Breuil
afdef9d298
openbsd: add is_laptop boolean and only add ac/batt devices if true
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:12 +00:00
Landry Breuil
7b4c52bfb9
openbsd: set has-history & has-statistics to TRUE
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:11 +00:00
Landry Breuil
f001a92ec5
openbsd: add up_native_is_laptop()
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:09 +00:00
Landry Breuil
07100772ab
openbsd: Move os-specific headers inclusion to up-apm-native.h
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:08 +00:00
Landry Breuil
527019ea82
openbsd: update ac online status too
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:07 +00:00
Landry Breuil
4ba9516b6a
openbsd: cast battery_life to gdouble
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:05 +00:00
Landry Breuil
543159173a
openbsd: Don't update percentage, probably missing a cast
...
Fix some return codes, and give sane defaults to ac/batt devices
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:04 +00:00
Landry Breuil
c9296f51ba
openbsd: Use separate 'static' devices for ac and battery
...
Move UpApmNative object to its own header for use by UpBackend
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:02 +00:00
Landry Breuil
a5e0d246e0
openbsd: add dumb ApmNative gobject
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:01 +00:00
Landry Breuil
ba3ffa0052
openbsd: fetch batt info from APM_IOC_GETPOWER ioctl()
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:57 +00:00
Landry Breuil
6b32cea9c3
openbsd: do a delayed add for device coldplugging, and emit device-added signal
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:56 +00:00
Landry Breuil
5e36534edf
trivial: actually return a string
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:54 +00:00
Landry Breuil
23948aed38
trivial: return FALSE in callback
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:53 +00:00
Landry Breuil
41e678a8f4
openbsd: Add GObject stuff + wip on apm_thread/apm_event_cb
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:51 +00:00
Landry Breuil
4746c7df50
openbsd: add skeleton code
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:50 +00:00
Landry Breuil
ad04d9fd44
Add openbsd backend switches
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:49 +00:00
Landry Breuil
2527d0170d
upower needs -pthread
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:48 +00:00
Landry Breuil
d81b7ebee4
openbsd: add openbsd backend SUBDIR
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:46 +00:00
Richard Hughes
befdb09c54
trivial: post release version bump
2011-03-21 10:14:59 +00:00
Richard Hughes
36e97ab4cc
Released UPower 0.9.9
2011-03-21 10:11:17 +00:00
Richard Hughes
e4574b70ac
Correct the DBus-glib property name for LidForceSleep
2011-03-14 11:25:06 +00:00
Richard Hughes
b0bbb29df1
Add a config option 'EnableWattsUpPro' to disable the Watts Up Pro device
...
Annoyingly, the device used in the Watts Up Pro device seems to be a generic
USB->serial adaptor, which means it doesn't have a unique vendor and product
ID. If we try to probe for the WUP device, we can actually upset other devices
that are not expecing to be probed. This fixes #33846 although we actually
still need to be more strict in detecting a true WUP device.
2011-03-14 11:01:12 +00:00
Richard Hughes
6e8794ac6d
Honour ACLOCAL_FLAGS in Makefile.am
2011-03-14 10:10:40 +00:00
Michael Biebl
d1e5f6a4da
Depend on stable GUdev API
...
The GUdev API was declared stable in udev release 147.
Bump the version in the configure check and drop the
G_UDEV_API_IS_SUBJECT_TO_CHANGE defines.
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-09 11:03:44 +00:00
Arnaud Patard
8b9ee53133
up-input.c: fix bitmap check
...
In up_input_coldplug(), some checks are done on the input device found in order
to detect if it's a lid switch or not.
The following one is problematic :
/* convert to a bitmask */
num_bits = up_input_str_to_bitmask (contents, bitmask, sizeof (bitmask));
if (num_bits != 1) {
g_debug ("not one bitmask entry for %s", native_path);
ret = FALSE;
goto out;
}
Checking if there's only 1 bit set is wrong. It's nice if you have a x86 with
acpi using 1 input device for the lid switch but it's not always nice.
One can create input devices with gpios-keys like this:
static struct gpio_keys_button keys[] = {
{
.code = SW_LID,
.gpio = ...,
.type = EV_SW,
.desc = "Lid Switch",
},
{
.code = SW_RFKILL_ALL,
.gpio = ...,
.type = EV_SW,
.desc = "rfkill",
},
};
The resulting SW bitmap will be 9 and thus there are 2 bits sets and due to the
mentionned check, the device is ignored by upower.
As a fix, I'm checking if the number of bits is between 0 and SW_CNT
bits.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-04 17:29:44 +00:00
Richard Hughes
38199e44ff
Add an option for polling dock devices in UPower.conf, defaulting to false
2011-03-03 14:02:27 +00:00
Michael Biebl
11301ae3d6
Drop devkit and devkit-power-daemon symlinks
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-02-23 16:18:53 +00:00
Richard Hughes
b31de44eee
Add a LidForceSleep property to ensure that we don't melt any laptops
...
We still need to add the DMI quirks, but I'm waiting for the
community to supply them now.
2011-02-02 13:44:09 +00:00
Richard Hughes
6343de2dd6
trivial: post release version bump
2011-01-07 11:50:14 +00:00
Richard Hughes
444a372e5a
Released UPower 0.9.8
2011-01-07 11:48:42 +00:00