public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Albert Cranford <ac9410@attbi.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [patch 3/3] 2.5.36 i2c new adapter i2c-pport driver
Date: Wed, 18 Sep 2002 12:33:46 -0400	[thread overview]
Message-ID: <3D88AAEA.2010009@mandrakesoft.com> (raw)
In-Reply-To: Pine.LNX.4.44.0209180205270.358-200000@home1

Albert Cranford wrote:
> +static int bit_pport_init(void)
> +{
> +	if (!request_region((base+2),1, "i2c (PPORT adapter)")) {
> +		return -ENODEV;	
> +	} else {
> +
> +		/* test for PPORT adap. 	*/
> +	
> +
> +		PortData=inb(base+2);
> +		PortData= (PortData SET_SDA) SET_SCL;
> +		outb(PortData,base+2);				
> +
> +		if (!(inb(base+2) | 0x06)) {	/* SDA and SCL will be high	*/
> +			DEBINIT(printk("i2c-pport.o: SDA and SCL was low.\n"));
> +			return -ENODEV;
> +		} else {
> +		
> +			/*SCL high and SDA low*/
> +			PortData = PortData SET_SCL CLR_SDA;
> +			outb(PortData,base+2);	
> +			udelay(400);


use schedule_timeout() instead of udelay() since you're in process 
context.  otherwise, looks ok...


      reply	other threads:[~2002-09-18 16:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18  6:07 [patch 3/3] 2.5.36 i2c new adapter i2c-pport driver Albert Cranford
2002-09-18 16:33 ` Jeff Garzik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D88AAEA.2010009@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=ac9410@attbi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox