make the linux-ppc packags be in synch with other platforms
[tangerine.git] / arch / common / hidd.radeon / ati_i2c.c
blob3be4f2635883ede5c89af546efa554a16cde1d6f
1 /*
2 Copyright © 2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "ati.h"
7 #include "radeon.h"
8 #include "radeon_reg.h"
9 #include "radeon_macros.h"
11 #include <aros/symbolsets.h>
12 #include <aros/debug.h>
13 #include <proto/exec.h>
15 void METHOD(ATII2C, Hidd_I2C, PutBits)
17 struct ati_staticdata *sd = SD(cl);
18 ULONG val;
20 val = INREG(sd->Card.DDCReg) & (ULONG)~(RADEON_GPIO_EN_0 | RADEON_GPIO_EN_1);
21 val |= (msg->scl ? 0:RADEON_GPIO_EN_1);
22 val |= (msg->sda ? 0:RADEON_GPIO_EN_0);
23 OUTREG(sd->Card.DDCReg, val);
24 val = INREG(sd->Card.DDCReg);
27 void METHOD(ATII2C, Hidd_I2C, GetBits)
29 struct ati_staticdata *sd = SD(cl);
31 ULONG val = INREG(sd->Card.DDCReg);
32 *msg->sda = (val & RADEON_GPIO_Y_0) != 0;
33 *msg->scl = (val & RADEON_GPIO_Y_1) != 0;
36 ADD2LIBS((STRPTR)"i2c.hidd", 0, static struct Library *, I2CBase);