linux/drivers/i2c/algos/i2c-algo-bit.c
<<
>>
Prefs
   1/* -------------------------------------------------------------------------
   2 * i2c-algo-bit.c i2c driver algorithms for bit-shift adapters
   3 * -------------------------------------------------------------------------
   4 *   Copyright (C) 1995-2000 Simon G. Vogl
   5
   6    This program is free software; you can redistribute it and/or modify
   7    it under the terms of the GNU General Public License as published by
   8    the Free Software Foundation; either version 2 of the License, or
   9    (at your option) any later version.
  10
  11    This program is distributed in the hope that it will be useful,
  12    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14    GNU General Public License for more details.
  15 * ------------------------------------------------------------------------- */
  16
  17/* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
  18   <kmalkki@cc.hut.fi> and Jean Delvare <khali@linux-fr.org> */
  19
  20#include <linux/kernel.h>
  21#include <linux/module.h>
  22#include <linux/delay.h>
  23#include <linux/init.h>
  24#include <linux/errno.h>
  25#include <linux/sched.h>
  26#include <linux/i2c.h>
  27#include <linux/i2c-algo-bit.h>
  28
  29
  30/* ----- global defines ----------------------------------------------- */
  31
  32#ifdef DEBUG
  33#define bit_dbg(level, dev, format, args...) \
  34        do { \
  35                if (i2c_debug >= level) \
  36                        dev_dbg(dev, format, ##args); \
  37        } while (0)
  38#else
  39#define bit_dbg(level, dev, format, args...) \
  40        do {} while (0)
  41#endif /* DEBUG */
  42
  43/* ----- global variables --------------------------------------------- */
  44
  45static int bit_test;    /* see if the line-setting functions work       */
  46module_param(bit_test, int, S_IRUGO);
  47MODULE_PARM_DESC(bit_test, "lines testing - 0 off; 1 report; 2 fail if stuck");
  48
  49#ifdef DEBUG
  50static int i2c_debug = 1;
  51module_param(i2c_debug, int, S_IRUGO | S_IWUSR);
  52MODULE_PARM_DESC(i2c_debug,
  53                 "debug level - 0 off; 1 normal; 2 verbose; 3 very verbose");
  54#endif
  55
  56/* --- setting states on the bus with the right timing: --------------- */
  57
  58#define setsda(adap, val)       adap->setsda(adap->data, val)
  59#define setscl(adap, val)       adap->setscl(adap->data, val)
  60#define getsda(adap)            adap->getsda(adap->data)
  61#define getscl(adap)            adap->getscl(adap->data)
  62
  63static inline void sdalo(struct i2c_algo_bit_data *adap)
  64{
  65        setsda(adap, 0);
  66        udelay((adap->udelay + 1) / 2);
  67}
  68
  69static inline void sdahi(struct i2c_algo_bit_data *adap)
  70{
  71        setsda(adap, 1);
  72        udelay((adap->udelay + 1) / 2);
  73}
  74
  75static inline void scllo(struct i2c_algo_bit_data *adap)
  76{
  77        setscl(adap, 0);
  78        udelay(adap->udelay / 2);
  79}
  80
  81/*
  82 * Raise scl line, and do checking for delays. This is necessary for slower
  83 * devices.
  84 */
  85static int sclhi(struct i2c_algo_bit_data *adap)
  86{
  87        unsigned long start;
  88
  89        setscl(adap, 1);
  90
  91        /* Not all adapters have scl sense line... */
  92        if (!adap->getscl)
  93                goto done;
  94
  95        start = jiffies;
  96        while (!getscl(adap)) {
  97                /* This hw knows how to read the clock line, so we wait
  98                 * until it actually gets high.  This is safer as some
  99                 * chips may hold it low ("clock stretching") while they
 100                 * are processing data internally.
 101                 */
 102                if (time_after(jiffies, start + adap->timeout)) {
 103                        /* Test one last time, as we may have been preempted
 104                         * between last check and timeout test.
 105                         */
 106                        if (getscl(adap))
 107                                break;
 108                        return -ETIMEDOUT;
 109                }
 110                cpu_relax();
 111        }
 112#ifdef DEBUG
 113        if (jiffies != start && i2c_debug >= 3)
 114                pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go "
 115                         "high\n", jiffies - start);
 116#endif
 117
 118done:
 119        udelay(adap->udelay);
 120        return 0;
 121}
 122
 123
 124/* --- other auxiliary functions -------------------------------------- */
 125static void i2c_start(struct i2c_algo_bit_data *adap)
 126{
 127        /* assert: scl, sda are high */
 128        setsda(adap, 0);
 129        udelay(adap->udelay);
 130        scllo(adap);
 131}
 132
 133static void i2c_repstart(struct i2c_algo_bit_data *adap)
 134{
 135        /* assert: scl is low */
 136        sdahi(adap);
 137        sclhi(adap);
 138        setsda(adap, 0);
 139        udelay(adap->udelay);
 140        scllo(adap);
 141}
 142
 143
 144static void i2c_stop(struct i2c_algo_bit_data *adap)
 145{
 146        /* assert: scl is low */
 147        sdalo(adap);
 148        sclhi(adap);
 149        setsda(adap, 1);
 150        udelay(adap->udelay);
 151}
 152
 153
 154
 155/* send a byte without start cond., look for arbitration,
 156   check ackn. from slave */
 157/* returns:
 158 * 1 if the device acknowledged
 159 * 0 if the device did not ack
 160 * -ETIMEDOUT if an error occurred (while raising the scl line)
 161 */
 162static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
 163{
 164        int i;
 165        int sb;
 166        int ack;
 167        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 168
 169        /* assert: scl is low */
 170        for (i = 7; i >= 0; i--) {
 171                sb = (c >> i) & 1;
 172                setsda(adap, sb);
 173                udelay((adap->udelay + 1) / 2);
 174                if (sclhi(adap) < 0) { /* timed out */
 175                        bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, "
 176                                "timeout at bit #%d\n", (int)c, i);
 177                        return -ETIMEDOUT;
 178                }
 179                /* FIXME do arbitration here:
 180                 * if (sb && !getsda(adap)) -> ouch! Get out of here.
 181                 *
 182                 * Report a unique code, so higher level code can retry
 183                 * the whole (combined) message and *NOT* issue STOP.
 184                 */
 185                scllo(adap);
 186        }
 187        sdahi(adap);
 188        if (sclhi(adap) < 0) { /* timeout */
 189                bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, "
 190                        "timeout at ack\n", (int)c);
 191                return -ETIMEDOUT;
 192        }
 193
 194        /* read ack: SDA should be pulled down by slave, or it may
 195         * NAK (usually to report problems with the data we wrote).
 196         */
 197        ack = !getsda(adap);    /* ack: sda is pulled low -> success */
 198        bit_dbg(2, &i2c_adap->dev, "i2c_outb: 0x%02x %s\n", (int)c,
 199                ack ? "A" : "NA");
 200
 201        scllo(adap);
 202        return ack;
 203        /* assert: scl is low (sda undef) */
 204}
 205
 206
 207static int i2c_inb(struct i2c_adapter *i2c_adap)
 208{
 209        /* read byte via i2c port, without start/stop sequence  */
 210        /* acknowledge is sent in i2c_read.                     */
 211        int i;
 212        unsigned char indata = 0;
 213        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 214
 215        /* assert: scl is low */
 216        sdahi(adap);
 217        for (i = 0; i < 8; i++) {
 218                if (sclhi(adap) < 0) { /* timeout */
 219                        bit_dbg(1, &i2c_adap->dev, "i2c_inb: timeout at bit "
 220                                "#%d\n", 7 - i);
 221                        return -ETIMEDOUT;
 222                }
 223                indata *= 2;
 224                if (getsda(adap))
 225                        indata |= 0x01;
 226                setscl(adap, 0);
 227                udelay(i == 7 ? adap->udelay / 2 : adap->udelay);
 228        }
 229        /* assert: scl is low */
 230        return indata;
 231}
 232
 233/*
 234 * Sanity check for the adapter hardware - check the reaction of
 235 * the bus lines only if it seems to be idle.
 236 */
 237static int test_bus(struct i2c_adapter *i2c_adap)
 238{
 239        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 240        const char *name = i2c_adap->name;
 241        int scl, sda, ret;
 242
 243        if (adap->pre_xfer) {
 244                ret = adap->pre_xfer(i2c_adap);
 245                if (ret < 0)
 246                        return -ENODEV;
 247        }
 248
 249        if (adap->getscl == NULL)
 250                pr_info("%s: Testing SDA only, SCL is not readable\n", name);
 251
 252        sda = getsda(adap);
 253        scl = (adap->getscl == NULL) ? 1 : getscl(adap);
 254        if (!scl || !sda) {
 255                printk(KERN_WARNING
 256                       "%s: bus seems to be busy (scl=%d, sda=%d)\n",
 257                       name, scl, sda);
 258                goto bailout;
 259        }
 260
 261        sdalo(adap);
 262        sda = getsda(adap);
 263        scl = (adap->getscl == NULL) ? 1 : getscl(adap);
 264        if (sda) {
 265                printk(KERN_WARNING "%s: SDA stuck high!\n", name);
 266                goto bailout;
 267        }
 268        if (!scl) {
 269                printk(KERN_WARNING "%s: SCL unexpected low "
 270                       "while pulling SDA low!\n", name);
 271                goto bailout;
 272        }
 273
 274        sdahi(adap);
 275        sda = getsda(adap);
 276        scl = (adap->getscl == NULL) ? 1 : getscl(adap);
 277        if (!sda) {
 278                printk(KERN_WARNING "%s: SDA stuck low!\n", name);
 279                goto bailout;
 280        }
 281        if (!scl) {
 282                printk(KERN_WARNING "%s: SCL unexpected low "
 283                       "while pulling SDA high!\n", name);
 284                goto bailout;
 285        }
 286
 287        scllo(adap);
 288        sda = getsda(adap);
 289        scl = (adap->getscl == NULL) ? 0 : getscl(adap);
 290        if (scl) {
 291                printk(KERN_WARNING "%s: SCL stuck high!\n", name);
 292                goto bailout;
 293        }
 294        if (!sda) {
 295                printk(KERN_WARNING "%s: SDA unexpected low "
 296                       "while pulling SCL low!\n", name);
 297                goto bailout;
 298        }
 299
 300        sclhi(adap);
 301        sda = getsda(adap);
 302        scl = (adap->getscl == NULL) ? 1 : getscl(adap);
 303        if (!scl) {
 304                printk(KERN_WARNING "%s: SCL stuck low!\n", name);
 305                goto bailout;
 306        }
 307        if (!sda) {
 308                printk(KERN_WARNING "%s: SDA unexpected low "
 309                       "while pulling SCL high!\n", name);
 310                goto bailout;
 311        }
 312
 313        if (adap->post_xfer)
 314                adap->post_xfer(i2c_adap);
 315
 316        pr_info("%s: Test OK\n", name);
 317        return 0;
 318bailout:
 319        sdahi(adap);
 320        sclhi(adap);
 321
 322        if (adap->post_xfer)
 323                adap->post_xfer(i2c_adap);
 324
 325        return -ENODEV;
 326}
 327
 328/* ----- Utility functions
 329 */
 330
 331/* try_address tries to contact a chip for a number of
 332 * times before it gives up.
 333 * return values:
 334 * 1 chip answered
 335 * 0 chip did not answer
 336 * -x transmission error
 337 */
 338static int try_address(struct i2c_adapter *i2c_adap,
 339                       unsigned char addr, int retries)
 340{
 341        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 342        int i, ret = 0;
 343
 344        for (i = 0; i <= retries; i++) {
 345                ret = i2c_outb(i2c_adap, addr);
 346                if (ret == 1 || i == retries)
 347                        break;
 348                bit_dbg(3, &i2c_adap->dev, "emitting stop condition\n");
 349                i2c_stop(adap);
 350                udelay(adap->udelay);
 351                yield();
 352                bit_dbg(3, &i2c_adap->dev, "emitting start condition\n");
 353                i2c_start(adap);
 354        }
 355        if (i && ret)
 356                bit_dbg(1, &i2c_adap->dev, "Used %d tries to %s client at "
 357                        "0x%02x: %s\n", i + 1,
 358                        addr & 1 ? "read from" : "write to", addr >> 1,
 359                        ret == 1 ? "success" : "failed, timeout?");
 360        return ret;
 361}
 362
 363static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 364{
 365        const unsigned char *temp = msg->buf;
 366        int count = msg->len;
 367        unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK;
 368        int retval;
 369        int wrcount = 0;
 370
 371        while (count > 0) {
 372                retval = i2c_outb(i2c_adap, *temp);
 373
 374                /* OK/ACK; or ignored NAK */
 375                if ((retval > 0) || (nak_ok && (retval == 0))) {
 376                        count--;
 377                        temp++;
 378                        wrcount++;
 379
 380                /* A slave NAKing the master means the slave didn't like
 381                 * something about the data it saw.  For example, maybe
 382                 * the SMBus PEC was wrong.
 383                 */
 384                } else if (retval == 0) {
 385                        dev_err(&i2c_adap->dev, "sendbytes: NAK bailout.\n");
 386                        return -EIO;
 387
 388                /* Timeout; or (someday) lost arbitration
 389                 *
 390                 * FIXME Lost ARB implies retrying the transaction from
 391                 * the first message, after the "winning" master issues
 392                 * its STOP.  As a rule, upper layer code has no reason
 393                 * to know or care about this ... it is *NOT* an error.
 394                 */
 395                } else {
 396                        dev_err(&i2c_adap->dev, "sendbytes: error %d\n",
 397                                        retval);
 398                        return retval;
 399                }
 400        }
 401        return wrcount;
 402}
 403
 404static int acknak(struct i2c_adapter *i2c_adap, int is_ack)
 405{
 406        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 407
 408        /* assert: sda is high */
 409        if (is_ack)             /* send ack */
 410                setsda(adap, 0);
 411        udelay((adap->udelay + 1) / 2);
 412        if (sclhi(adap) < 0) {  /* timeout */
 413                dev_err(&i2c_adap->dev, "readbytes: ack/nak timeout\n");
 414                return -ETIMEDOUT;
 415        }
 416        scllo(adap);
 417        return 0;
 418}
 419
 420static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 421{
 422        int inval;
 423        int rdcount = 0;        /* counts bytes read */
 424        unsigned char *temp = msg->buf;
 425        int count = msg->len;
 426        const unsigned flags = msg->flags;
 427
 428        while (count > 0) {
 429                inval = i2c_inb(i2c_adap);
 430                if (inval >= 0) {
 431                        *temp = inval;
 432                        rdcount++;
 433                } else {   /* read timed out */
 434                        break;
 435                }
 436
 437                temp++;
 438                count--;
 439
 440                /* Some SMBus transactions require that we receive the
 441                   transaction length as the first read byte. */
 442                if (rdcount == 1 && (flags & I2C_M_RECV_LEN)) {
 443                        if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) {
 444                                if (!(flags & I2C_M_NO_RD_ACK))
 445                                        acknak(i2c_adap, 0);
 446                                dev_err(&i2c_adap->dev, "readbytes: invalid "
 447                                        "block length (%d)\n", inval);
 448                                return -EPROTO;
 449                        }
 450                        /* The original count value accounts for the extra
 451                           bytes, that is, either 1 for a regular transaction,
 452                           or 2 for a PEC transaction. */
 453                        count += inval;
 454                        msg->len += inval;
 455                }
 456
 457                bit_dbg(2, &i2c_adap->dev, "readbytes: 0x%02x %s\n",
 458                        inval,
 459                        (flags & I2C_M_NO_RD_ACK)
 460                                ? "(no ack/nak)"
 461                                : (count ? "A" : "NA"));
 462
 463                if (!(flags & I2C_M_NO_RD_ACK)) {
 464                        inval = acknak(i2c_adap, count);
 465                        if (inval < 0)
 466                                return inval;
 467                }
 468        }
 469        return rdcount;
 470}
 471
 472/* doAddress initiates the transfer by generating the start condition (in
 473 * try_address) and transmits the address in the necessary format to handle
 474 * reads, writes as well as 10bit-addresses.
 475 * returns:
 476 *  0 everything went okay, the chip ack'ed, or IGNORE_NAK flag was set
 477 * -x an error occurred (like: -ENXIO if the device did not answer, or
 478 *      -ETIMEDOUT, for example if the lines are stuck...)
 479 */
 480static int bit_doAddress(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 481{
 482        unsigned short flags = msg->flags;
 483        unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK;
 484        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 485
 486        unsigned char addr;
 487        int ret, retries;
 488
 489        retries = nak_ok ? 0 : i2c_adap->retries;
 490
 491        if (flags & I2C_M_TEN) {
 492                /* a ten bit address */
 493                addr = 0xf0 | ((msg->addr >> 7) & 0x06);
 494                bit_dbg(2, &i2c_adap->dev, "addr0: %d\n", addr);
 495                /* try extended address code...*/
 496                ret = try_address(i2c_adap, addr, retries);
 497                if ((ret != 1) && !nak_ok)  {
 498                        dev_err(&i2c_adap->dev,
 499                                "died at extended address code\n");
 500                        return -ENXIO;
 501                }
 502                /* the remaining 8 bit address */
 503                ret = i2c_outb(i2c_adap, msg->addr & 0xff);
 504                if ((ret != 1) && !nak_ok) {
 505                        /* the chip did not ack / xmission error occurred */
 506                        dev_err(&i2c_adap->dev, "died at 2nd address code\n");
 507                        return -ENXIO;
 508                }
 509                if (flags & I2C_M_RD) {
 510                        bit_dbg(3, &i2c_adap->dev, "emitting repeated "
 511                                "start condition\n");
 512                        i2c_repstart(adap);
 513                        /* okay, now switch into reading mode */
 514                        addr |= 0x01;
 515                        ret = try_address(i2c_adap, addr, retries);
 516                        if ((ret != 1) && !nak_ok) {
 517                                dev_err(&i2c_adap->dev,
 518                                        "died at repeated address code\n");
 519                                return -EIO;
 520                        }
 521                }
 522        } else {                /* normal 7bit address  */
 523                addr = msg->addr << 1;
 524                if (flags & I2C_M_RD)
 525                        addr |= 1;
 526                if (flags & I2C_M_REV_DIR_ADDR)
 527                        addr ^= 1;
 528                ret = try_address(i2c_adap, addr, retries);
 529                if ((ret != 1) && !nak_ok)
 530                        return -ENXIO;
 531        }
 532
 533        return 0;
 534}
 535
 536static int bit_xfer(struct i2c_adapter *i2c_adap,
 537                    struct i2c_msg msgs[], int num)
 538{
 539        struct i2c_msg *pmsg;
 540        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 541        int i, ret;
 542        unsigned short nak_ok;
 543
 544        if (adap->pre_xfer) {
 545                ret = adap->pre_xfer(i2c_adap);
 546                if (ret < 0)
 547                        return ret;
 548        }
 549
 550        bit_dbg(3, &i2c_adap->dev, "emitting start condition\n");
 551        i2c_start(adap);
 552        for (i = 0; i < num; i++) {
 553                pmsg = &msgs[i];
 554                nak_ok = pmsg->flags & I2C_M_IGNORE_NAK;
 555                if (!(pmsg->flags & I2C_M_NOSTART)) {
 556                        if (i) {
 557                                bit_dbg(3, &i2c_adap->dev, "emitting "
 558                                        "repeated start condition\n");
 559                                i2c_repstart(adap);
 560                        }
 561                        ret = bit_doAddress(i2c_adap, pmsg);
 562                        if ((ret != 0) && !nak_ok) {
 563                                bit_dbg(1, &i2c_adap->dev, "NAK from "
 564                                        "device addr 0x%02x msg #%d\n",
 565                                        msgs[i].addr, i);
 566                                goto bailout;
 567                        }
 568                }
 569                if (pmsg->flags & I2C_M_RD) {
 570                        /* read bytes into buffer*/
 571                        ret = readbytes(i2c_adap, pmsg);
 572                        if (ret >= 1)
 573                                bit_dbg(2, &i2c_adap->dev, "read %d byte%s\n",
 574                                        ret, ret == 1 ? "" : "s");
 575                        if (ret < pmsg->len) {
 576                                if (ret >= 0)
 577                                        ret = -EIO;
 578                                goto bailout;
 579                        }
 580                } else {
 581                        /* write bytes from buffer */
 582                        ret = sendbytes(i2c_adap, pmsg);
 583                        if (ret >= 1)
 584                                bit_dbg(2, &i2c_adap->dev, "wrote %d byte%s\n",
 585                                        ret, ret == 1 ? "" : "s");
 586                        if (ret < pmsg->len) {
 587                                if (ret >= 0)
 588                                        ret = -EIO;
 589                                goto bailout;
 590                        }
 591                }
 592        }
 593        ret = i;
 594
 595bailout:
 596        bit_dbg(3, &i2c_adap->dev, "emitting stop condition\n");
 597        i2c_stop(adap);
 598
 599        if (adap->post_xfer)
 600                adap->post_xfer(i2c_adap);
 601        return ret;
 602}
 603
 604static u32 bit_func(struct i2c_adapter *adap)
 605{
 606        return I2C_FUNC_I2C | I2C_FUNC_NOSTART | I2C_FUNC_SMBUS_EMUL |
 607               I2C_FUNC_SMBUS_READ_BLOCK_DATA |
 608               I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
 609               I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
 610}
 611
 612
 613/* -----exported algorithm data: -------------------------------------  */
 614
 615const struct i2c_algorithm i2c_bit_algo = {
 616        .master_xfer    = bit_xfer,
 617        .functionality  = bit_func,
 618};
 619EXPORT_SYMBOL(i2c_bit_algo);
 620
 621/*
 622 * registering functions to load algorithms at runtime
 623 */
 624static int __i2c_bit_add_bus(struct i2c_adapter *adap,
 625                             int (*add_adapter)(struct i2c_adapter *))
 626{
 627        struct i2c_algo_bit_data *bit_adap = adap->algo_data;
 628        int ret;
 629
 630        if (bit_test) {
 631                ret = test_bus(adap);
 632                if (bit_test >= 2 && ret < 0)
 633                        return -ENODEV;
 634        }
 635
 636        /* register new adapter to i2c module... */
 637        adap->algo = &i2c_bit_algo;
 638        adap->retries = 3;
 639
 640        ret = add_adapter(adap);
 641        if (ret < 0)
 642                return ret;
 643
 644        /* Complain if SCL can't be read */
 645        if (bit_adap->getscl == NULL) {
 646                dev_warn(&adap->dev, "Not I2C compliant: can't read SCL\n");
 647                dev_warn(&adap->dev, "Bus may be unreliable\n");
 648        }
 649        return 0;
 650}
 651
 652int i2c_bit_add_bus(struct i2c_adapter *adap)
 653{
 654        return __i2c_bit_add_bus(adap, i2c_add_adapter);
 655}
 656EXPORT_SYMBOL(i2c_bit_add_bus);
 657
 658int i2c_bit_add_numbered_bus(struct i2c_adapter *adap)
 659{
 660        return __i2c_bit_add_bus(adap, i2c_add_numbered_adapter);
 661}
 662EXPORT_SYMBOL(i2c_bit_add_numbered_bus);
 663
 664MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
 665MODULE_DESCRIPTION("I2C-Bus bit-banging algorithm");
 666MODULE_LICENSE("GPL");
 667