From: Greg KH <greg@kroah.com>
To: Tomek The Messenger <tomekthemessenger@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: how to perform i2c transaction with disabled irq?
Date: Thu, 30 Apr 2020 13:20:47 +0200 [thread overview]
Message-ID: <20200430112047.GA2945793@kroah.com> (raw)
In-Reply-To: <CAA4NGysEjWQQG82uR83H=D_6tydNiwquu=peQhPq5PSRmaHevQ@mail.gmail.com>
On Thu, Apr 30, 2020 at 01:11:06PM +0200, Tomek The Messenger wrote:
> Hi
> If I don't have disabled irqs I can use API i2c_smbus_write_byte in order
> to perform i2c transaction.
> But how to make i2c transaction if I have disabled irq? Is any built-in
> function which lets such operation, where there is some polling implemented?
> The background is that I do i2c transaction in restart handler (some i2c
> transaction to hot swap controller) in order to reset board. And linux
> before entering restart handler list disable interrupts. There is a
> function to enable back interrupts but in company in which I am working
> engineers reviewed it and said "it is not allowed, restart must be
> performed when interrupts are disabled".
Ask the engineers how you are supposed to use an interrupt driven device
with interrupts disabled.
good luck!
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2020-04-30 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 11:11 how to perform i2c transaction with disabled irq? Tomek The Messenger
2020-04-30 11:20 ` Greg KH [this message]
2020-04-30 14:13 ` Tomek The Messenger
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=20200430112047.GA2945793@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=tomekthemessenger@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.