History log of /freebsd-9.3-release/sys/dev/pcf/pcf.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 194026 11-Jun-2009 avg

strict kobj signatures: fix iicbus_write impl in dev/pcf

input buf is const

Reviewed by: imp, current@
Approved by: jhb (mentor)


# 181332 05-Aug-2008 jhb

- Consolidate module version for the pcf module into just pcf.c instead
of having duplicate versions in each bus attachment.
- Add a DRIVER_MODULE() instance so that the iicbus(4) driver will
actually attach to pcf(4) driver instances.
- Fix compile of envctrl.c.

Pointy hat: jhb (3)


# 181303 04-Aug-2008 jhb

Add locking to the various iicbus(4) bridge drivers:
- Just grab Giant in the ixp425_iic(4) driver since this driver uses
a shared address/data register window pair to access the actual
I2C registers. None of the other ixp425 drivers lock access to these
shared address/data registers yet and that would need to be done before
this could use any meaningful locking.
- Add locking to the interrupt handler and 'iicbus_reset' methods of the
at91_twi(4) driver.
- Add locking to the pcf(4) driver. Other pcf(4) fixes include:
- Don't needlessly zero the softc.
- Use bus_foo rather than bus_space_foo and remove bus space tag and
handle from softc.
- The lpbb(4) driver just grabs Giant for now. This will be refined later
when ppbus(4) is locked.
- As was done with smbus earlier, move the DRIVER_MODULE() lines to match
the bus driver (either iicbus or iicbb) to the bridge driver into the
bridge drivers.

Tested by: sam (arm/ixp425)


# 129893 31-May-2004 nsouch

Necessary modifications do get pcf working again for ISA. Tested with
my Elektor card. Note that the hints are necessary to specify the
IO base of the pcf chip. This enables to check the IO base when the
probe routine is called during ISA enumeration.

The interrupt driven code is mixed with polled mode, which is wrong
and produces supposed spurious interrupts at each access. I still have
to work on it.


# 129704 25-May-2004 joerg

Round #1 of improving pcf(4).

This splits the driver into a bus-independant backend, plus bus-specific
frontends. The old pcf(4) (i386/ISA) frontend is now in pcf_isa.c, the
frontend in envctrl.c is for sparc64/Ebus2 (Sun device name: SUNW,envctrl
from Sun E450 machines). More frontends are expected to appear in future.

This is not yet ready for public consumption, but it basically works.
Nicolas will bring over his ISA-specific fixes soon.

Reviewed by: nsouch


# 129703 25-May-2004 joerg

Null commit: this is just a notification only that this file has been
repo-copied over from src/sys/i386/isa/pcf.c which will be removed
from the old location as soon as the new stuff here is ready for the
masses.

The intention is to work up the old pcf(4) driver to become machine
independant, so it can be used for any PCF8584-controller I2C bus.


# 126996 14-Mar-2004 imp

Remove isa compat stuff.

Only cy, bs and wd in the tree still use it. I have a replacement for
cy that I need to test on ISA and PCI cards. bs and wd are pc98 only
drivers that appear to no longer be necessary. I'll be removing them
when I hear back from the pc98 people.


# 116599 20-Jun-2003 jmg

fix another LP64 problem. READ_IVAR takes a pointer to an uintptr_t, not
an int.


# 115703 02-Jun-2003 obrien

Use __FBSDID().


# 108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


# 93165 25-Mar-2002 nsouch

Fix bktr and pcf compilation with LINT


# 87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


# 67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


# 59391 19-Apr-2000 phk

Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>


# 55939 13-Jan-2000 nsouch

Port of ppbus standalone framework to the newbus system.

Note1: the correct interrupt level is invoked correctly for each driver.
For this purpose, drivers request the bus before being able to
call BUS_SETUP_INTR and BUS_TEARDOWN_INTR call is forced by the ppbus
core when drivers release it. Thus, when BUS_SETUP_INTR is called
at ppbus driver level, ppbus checks that the caller owns the
bus and stores the interrupt handler cookie (in order to unregister
it later).

Printing is impossible while plip link is up is still TRUE.
vpo (ZIP driver) and lpt are make in such a way that
using the ZIP and printing concurrently is permitted is also TRUE.

Note2: specific chipset detection is not done by default. PPC_PROBE_CHIPSET
is now needed to force chipset detection. If set, the flags 0x40
still avoid detection at boot.

Port of the pcf(4) driver to the newbus system (was previously directly
connected to the rootbus and attached by a bogus pcf_isa_probe function).


# 54073 03-Dec-1999 mdodd

Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered(). 'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t. Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything. I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by: peter, dfr


# 52123 11-Oct-1999 peter

Trim some unused #includes

Submitted by: phk


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49195 28-Jul-1999 mdodd

Alter the behavior of sys/kern/subr_bus.c:device_print_child()

- device_print_child() either lets the BUS_PRINT_CHILD
method produce the entire device announcement message or
it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

- Devices are 'on' a bus, not 'at' it.
- If a custom BUS_PRINT_CHILD method does the same thing
as bus_generic_print_child(), use bus_generic_print_child()
- Use device_get_nameunit() instead of both
device_get_name() and device_get_unit()
- All BUS_PRINT_CHILD methods return the number of
characters output.

Reviewed by: dfr, peter


# 46743 08-May-1999 dfr

Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.


# 46573 06-May-1999 peter

Missing 'int' in declaration of variables.


# 46343 02-May-1999 peter

Operator precedence bug

PR: 11411
Submitted by: Christopher Peterson <cpeterso@cs.washington.edu>


# 41591 07-Dec-1998 archie

The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.


# 40915 04-Nov-1998 nsouch

iicbus probe and attach deferred until root_bus_configure() call.


# 40788 31-Oct-1998 peter

Fixup prototypes so that this beastie compiles.


# 40784 31-Oct-1998 nsouch

pcf.c: timeout management added

ppc.c: nsc code improved. Actually, a complete rewrite.


# 40565 22-Oct-1998 bde

Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c. Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato


# 38781 03-Sep-1998 nsouch

Reviewed by: Doug Rabson
Submitted by: nsouch
Philips PCF8584 chipset support. Chipset controller for the I2C bus.