|
Lines 13-19
Link Here
|
| 13 |
* THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR |
13 |
* THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR |
| 14 |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
14 |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 15 |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
15 |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 16 |
* EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
16 |
* EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 17 |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
17 |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 18 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
18 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
| 19 |
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
19 |
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
|
Lines 52-58
Link Here
|
| 52 |
|
52 |
|
| 53 |
struct pcfclock_data { |
53 |
struct pcfclock_data { |
| 54 |
int count; |
54 |
int count; |
| 55 |
struct ppb_device pcfclock_dev; |
|
|
| 56 |
}; |
55 |
}; |
| 57 |
|
56 |
|
| 58 |
#define DEVTOSOFTC(dev) \ |
57 |
#define DEVTOSOFTC(dev) \ |
|
Lines 126-132
Link Here
|
| 126 |
static void |
125 |
static void |
| 127 |
pcfclock_identify(driver_t *driver, device_t parent) |
126 |
pcfclock_identify(driver_t *driver, device_t parent) |
| 128 |
{ |
127 |
{ |
| 129 |
|
|
|
| 130 |
BUS_ADD_CHILD(parent, 0, PCFCLOCK_NAME, 0); |
128 |
BUS_ADD_CHILD(parent, 0, PCFCLOCK_NAME, 0); |
| 131 |
} |
129 |
} |
| 132 |
|
130 |
|
|
Lines 186-194
Link Here
|
| 186 |
device_t ppbus = device_get_parent(pcfclockdev); |
184 |
device_t ppbus = device_get_parent(pcfclockdev); |
| 187 |
|
185 |
|
| 188 |
sc->count--; |
186 |
sc->count--; |
| 189 |
if (sc->count == 0) { |
187 |
if (sc->count == 0) |
| 190 |
ppb_release_bus(ppbus, pcfclockdev); |
188 |
ppb_release_bus(ppbus, pcfclockdev); |
| 191 |
} |
|
|
| 192 |
|
189 |
|
| 193 |
return (0); |
190 |
return (0); |
| 194 |
} |
191 |
} |
|
Lines 223-228
Link Here
|
| 223 |
year = NR(buf, 14); |
220 |
year = NR(buf, 14); |
| 224 |
if (year < 70) |
221 |
if (year < 70) |
| 225 |
year += 100; |
222 |
year += 100; |
|
|
223 |
|
| 226 |
printf(PCFCLOCK_NAME "%d: %02d.%02d.%4d %02d:%02d:%02d, " |
224 |
printf(PCFCLOCK_NAME "%d: %02d.%02d.%4d %02d:%02d:%02d, " |
| 227 |
"battery status: %s\n", |
225 |
"battery status: %s\n", |
| 228 |
unit, |
226 |
unit, |