Commit Graph

2173 Commits

Author SHA1 Message Date
Greg Kroah-Hartman 56f10573be greybus: sdio: tie into gb core properly 2014-08-30 16:52:18 -07:00
Greg Kroah-Hartman 426f29d6be greybus: gpio: tie into gb core properly 2014-08-30 16:51:21 -07:00
Greg Kroah-Hartman 3d9efaaea3 greybus: i2c: use same naming convention everywhere 2014-08-30 16:49:59 -07:00
Greg Kroah-Hartman e7e0782c41 greybus: i2c: tie to the proper place on the greybus_device 2014-08-30 16:49:05 -07:00
Greg Kroah-Hartman db6e1fd264 greybus: hook up sdio, gpio, and tty into the greybus core. 2014-08-30 16:47:26 -07:00
Greg Kroah-Hartman 503c1cdbfb greybus: static module_init/exit functions 2014-08-30 16:21:03 -07:00
Greg Kroah-Hartman 199d68d4a8 greybus: start moving the function types into the greybus core 2014-08-30 16:20:22 -07:00
Alex Elder caaa8a838d greybus: uart-gb: a few minor bug fixes
Here are a few small bug fixes in uart-gb.c:
    - In wait_serial_change():
        - Return -EINVAL if *none* of the relevant flags are set in
          the "arg" parameter.
        - Balance the spin_lock_irq() with an unlock call (not
          another lock).
        - Rearrange a nested if structure (not a bug fix).
    - In tty_gb_probe():
        - Reset the greybus_device driver data in case of error.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-19 05:10:43 -05:00
Alex Elder ff5f0b3822 greybus: uart-gb: improve minor device number error checking
When alloc_minor() finds an available minor device number it
does not constrain the highest number desired.  Instead, it
relies on its caller, tty_gb_probe() to see if the returned
number indicates all minor numbers have been exhausted.

There are a couple problems with this--or rather with this
code.

First, if an allocation is attempted *after* GB_NUM_MINORS
is returned, a new number greater than (but not equal to)
GB_NUM_MINORS will be allocated, and that won't produce
any error condition.

Second, alloc_minor() can return an error code (like -ENOMEM).  And
its caller is only checking for GB_NUM_MINORS.  If an error code
is returned, tty_gb_probe() simply uses it.

Change alloc_minor() so it requests minor device numbers in the
range 0..(GB_NUM_MINORS-1), and use an error return to detect
when the minor device numbers have been exhausted.

If alloc_minor() returns -ENOSPC (from idr_alloc()), translate that
to -ENODEV.  The only other error we might see is -ENOMEM, and if
we get that, return it.

Finally, zero gb_tty->minor when it's released.  (If this is
actually important a reserved value like GB_NUM_MINORS should
be used instead to signify a gb_tty with no minor assigned.)

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-19 05:10:42 -05:00
Greg Kroah-Hartman e68453ed28 greybus: uart-gb: now builds, more framework added 2014-08-15 19:44:32 +08:00
Greg Kroah-Hartman a18e151757 greybus: more uart work 2014-08-15 18:54:11 +08:00
Greg Kroah-Hartman ff45c265f8 greybus: uart-gb: more work on tty functions 2014-08-15 18:33:33 +08:00
Greg Kroah-Hartman 79c822be7b greybus: uart framework added, doesn't build 2014-08-15 16:01:23 +08:00
Greg Kroah-Hartman e9023d227a greybus: gpio-gb.c: it now builds properly 2014-08-12 14:41:49 +08:00
Greg Kroah-Hartman c16854c3bf greybus: gpio driver 2014-08-12 12:00:16 +08:00
Greg Kroah-Hartman d5d1903dcd greybus: add framework for 'struct gbuf'
This is the equlivant of sk_buf or urbs for Greybus.
2014-08-11 19:03:20 +08:00
Greg Kroah-Hartman 83ddaaab01 greybus: Greybus SD/MMC host driver
Need to add specifics, but this should be enough to hook up to the mmc
framework.
2014-08-11 17:27:22 +08:00
Greg Kroah-Hartman 776f136c75 greybus: greybus.h: tiny coding style cleanups 2014-08-11 17:27:07 +08:00
Greg Kroah-Hartman 53419e07cc greybus: i2c-gb: actually add the i2c adapter properly... 2014-08-11 17:01:15 +08:00
Greg Kroah-Hartman 4c009fada1 greybus: update README with info on how to build and contact me. 2014-08-11 15:44:51 +08:00
Greg Kroah-Hartman 06823c3eb9 greybus: README and .gitignore updates 2014-08-11 15:32:12 +08:00
Greg Kroah-Hartman c8a797a98c greybus: Import most recent greybus code to new repo. 2014-08-11 15:30:45 +08:00
Greg Kroah-Hartman cd26f1bd6b greybus: Initial commit 2014-08-11 15:29:23 +08:00