All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 02/19] qapi: Convert query-mice
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hmp.c            |   20 ++++++++++++++++
 hmp.h            |    1 +
 input.c          |   64 +++++++++++++----------------------------------------
 monitor.c        |   11 +--------
 qapi-schema.json |   30 +++++++++++++++++++++++++
 qmp-commands.hx  |    6 +++++
 6 files changed, 74 insertions(+), 58 deletions(-)

diff --git a/hmp.c b/hmp.c
index 34416fc..9c6d896 100644
--- a/hmp.c
+++ b/hmp.c
@@ -94,6 +94,26 @@ void hmp_info_chardev(Monitor *mon)
     qapi_free_ChardevInfoList(char_info);
 }
 
+void hmp_info_mice(Monitor *mon)
+{
+    MouseInfoList *mice_list, *mouse;
+
+    mice_list = qmp_query_mice(NULL);
+    if (!mice_list) {
+        monitor_printf(mon, "No mouse devices connected\n");
+        return;
+    }
+
+    for (mouse = mice_list; mouse; mouse = mouse->next) {
+        monitor_printf(mon, "%c Mouse #%" PRId64 ": %s%s\n",
+                       mouse->value->current ? '*' : ' ',
+                       mouse->value->index, mouse->value->name,
+                       mouse->value->absolute ? " (absolute)" : "");
+    }
+
+    qapi_free_MouseInfoList(mice_list);
+}
+
 void hmp_quit(Monitor *mon, const QDict *qdict)
 {
     monitor_suspend(mon);
diff --git a/hmp.h b/hmp.h
index 92433cf..4e6697d 100644
--- a/hmp.h
+++ b/hmp.h
@@ -23,6 +23,7 @@ void hmp_info_kvm(Monitor *mon);
 void hmp_info_status(Monitor *mon);
 void hmp_info_uuid(Monitor *mon);
 void hmp_info_chardev(Monitor *mon);
+void hmp_info_mice(Monitor *mon);
 void hmp_quit(Monitor *mon, const QDict *qdict);
 void hmp_stop(Monitor *mon, const QDict *qdict);
 void hmp_system_reset(Monitor *mon, const QDict *qdict);
diff --git a/input.c b/input.c
index e2f7c92..9ade63f 100644
--- a/input.c
+++ b/input.c
@@ -26,7 +26,8 @@
 #include "net.h"
 #include "monitor.h"
 #include "console.h"
-#include "qjson.h"
+#include "error.h"
+#include "qmp-commands.h"
 
 static QEMUPutKBDEvent *qemu_put_kbd_event;
 static void *qemu_put_kbd_event_opaque;
@@ -211,60 +212,27 @@ int kbd_mouse_has_absolute(void)
     return 0;
 }
 
-static void info_mice_iter(QObject *data, void *opaque)
-{
-    QDict *mouse;
-    Monitor *mon = opaque;
-
-    mouse = qobject_to_qdict(data);
-    monitor_printf(mon, "%c Mouse #%" PRId64 ": %s%s\n",
-                  (qdict_get_bool(mouse, "current") ? '*' : ' '),
-                   qdict_get_int(mouse, "index"), qdict_get_str(mouse, "name"),
-                   qdict_get_bool(mouse, "absolute") ? " (absolute)" : "");
-}
-
-void do_info_mice_print(Monitor *mon, const QObject *data)
-{
-    QList *mice_list;
-
-    mice_list = qobject_to_qlist(data);
-    if (qlist_empty(mice_list)) {
-        monitor_printf(mon, "No mouse devices connected\n");
-        return;
-    }
-
-    qlist_iter(mice_list, info_mice_iter, mon);
-}
-
-void do_info_mice(Monitor *mon, QObject **ret_data)
+MouseInfoList *qmp_query_mice(Error **errp)
 {
+    MouseInfoList *mice_list = NULL;
     QEMUPutMouseEntry *cursor;
-    QList *mice_list;
-    int current;
-
-    mice_list = qlist_new();
+    bool current = true;
 
-    if (QTAILQ_EMPTY(&mouse_handlers)) {
-        goto out;
-    }
+    QTAILQ_FOREACH(cursor, &mouse_handlers, node) {
+        MouseInfoList *info = g_malloc0(sizeof(*info));
+        info->value = g_malloc0(sizeof(*info->value));
+        info->value->name = g_strdup(cursor->qemu_put_mouse_event_name);
+        info->value->index = cursor->index;
+        info->value->absolute = !!cursor->qemu_put_mouse_event_absolute;
+        info->value->current = current;
 
-    current = QTAILQ_FIRST(&mouse_handlers)->index;
+        current = false;
 
-    QTAILQ_FOREACH(cursor, &mouse_handlers, node) {
-        QObject *obj;
-        obj = qobject_from_jsonf("{ 'name': %s,"
-                                 "  'index': %d,"
-                                 "  'current': %i,"
-                                 "  'absolute': %i }",
-                                 cursor->qemu_put_mouse_event_name,
-                                 cursor->index,
-                                 cursor->index == current,
-                                 !!cursor->qemu_put_mouse_event_absolute);
-        qlist_append_obj(mice_list, obj);
+        info->next = mice_list;
+        mice_list = info;
     }
 
-out:
-    *ret_data = QOBJECT(mice_list);
+    return mice_list;
 }
 
 void do_mouse_set(Monitor *mon, const QDict *qdict)
diff --git a/monitor.c b/monitor.c
index ffda0fe..d95abce 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2942,8 +2942,7 @@ static const mon_cmd_t info_cmds[] = {
         .args_type  = "",
         .params     = "",
         .help       = "show which guest mouse is receiving events",
-        .user_print = do_info_mice_print,
-        .mhandler.info_new = do_info_mice,
+        .mhandler.info = hmp_info_mice,
     },
     {
         .name       = "vnc",
@@ -3093,14 +3092,6 @@ static const mon_cmd_t qmp_query_cmds[] = {
         .mhandler.info_new = do_pci_info,
     },
     {
-        .name       = "mice",
-        .args_type  = "",
-        .params     = "",
-        .help       = "show which guest mouse is receiving events",
-        .user_print = do_info_mice_print,
-        .mhandler.info_new = do_info_mice,
-    },
-    {
         .name       = "vnc",
         .args_type  = "",
         .params     = "",
diff --git a/qapi-schema.json b/qapi-schema.json
index 5922c4a..3175c82 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -226,6 +226,36 @@
 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
 
 ##
+# @MouseInfo:
+#
+# Information about a mouse device.
+#
+# @name: the name of the mouse device
+#
+# @index: the index of the mouse device
+#
+# @current: true if this device is currently receiving mouse events
+#
+# @absolute: true if this device supports absolute coordinates as input
+#
+# Since: 0.14.0
+##
+{ 'type': 'MouseInfo',
+  'data': {'name': 'str', 'index': 'int', 'current': 'bool',
+           'absolute': 'bool'} }
+
+##
+# @query-mice:
+#
+# Returns information about each active mouse device
+#
+# Returns: a list of @MouseInfo for each device
+#
+# Since: 0.14.0
+##
+{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
+
+##
 # @quit:
 #
 # This command will cause the QEMU process to exit gracefully.  While every
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 4328e8b..c535560 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1663,6 +1663,12 @@ Example:
 
 EQMP
 
+    {
+        .name       = "query-mice",
+        .args_type  = "",
+        .mhandler.cmd_new = qmp_marshal_input_query_mice,
+    },
+
 SQMP
 query-vnc
 ---------
-- 
1.7.7.1.431.g10b2a

^ permalink raw reply related

* [Qemu-devel] [PATCH 04/19] Monitor: Make mon_set_cpu() public
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>

Also rename it to monitor_set_cpu().

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |   11 +++++------
 monitor.h |    1 +
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/monitor.c b/monitor.c
index ea5ccd8..3f99ea0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -514,7 +514,6 @@ static int do_qmp_capabilities(Monitor *mon, const QDict *params,
     return 0;
 }
 
-static int mon_set_cpu(int cpu_index);
 static void handle_user_command(Monitor *mon, const char *cmdline);
 
 static int do_hmp_passthrough(Monitor *mon, const QDict *params,
@@ -532,7 +531,7 @@ static int do_hmp_passthrough(Monitor *mon, const QDict *params,
     cur_mon = &hmp;
 
     if (qdict_haskey(params, "cpu-index")) {
-        ret = mon_set_cpu(qdict_get_int(params, "cpu-index"));
+        ret = monitor_set_cpu(qdict_get_int(params, "cpu-index"));
         if (ret < 0) {
             cur_mon = old_mon;
             qerror_report(QERR_INVALID_PARAMETER_VALUE, "cpu-index", "a CPU number");
@@ -772,8 +771,8 @@ CommandInfoList *qmp_query_commands(Error **errp)
     return cmd_list;
 }
 
-/* get the current CPU defined by the user */
-static int mon_set_cpu(int cpu_index)
+/* set the current CPU defined by the user */
+int monitor_set_cpu(int cpu_index)
 {
     CPUState *env;
 
@@ -789,7 +788,7 @@ static int mon_set_cpu(int cpu_index)
 static CPUState *mon_get_cpu(void)
 {
     if (!cur_mon->mon_cpu) {
-        mon_set_cpu(0);
+        monitor_set_cpu(0);
     }
     cpu_synchronize_state(cur_mon->mon_cpu);
     return cur_mon->mon_cpu;
@@ -901,7 +900,7 @@ static void do_info_cpus(Monitor *mon, QObject **ret_data)
 static int do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     int index = qdict_get_int(qdict, "index");
-    if (mon_set_cpu(index) < 0) {
+    if (monitor_set_cpu(index) < 0) {
         qerror_report(QERR_INVALID_PARAMETER_VALUE, "index",
                       "a CPU number");
         return -1;
diff --git a/monitor.h b/monitor.h
index 4f2d328..9b723b2 100644
--- a/monitor.h
+++ b/monitor.h
@@ -57,6 +57,7 @@ void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
 void monitor_printf(Monitor *mon, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
 void monitor_print_filename(Monitor *mon, const char *filename);
 void monitor_flush(Monitor *mon);
+int monitor_set_cpu(int cpu_index);
 
 typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);
 
-- 
1.7.7.1.431.g10b2a

^ permalink raw reply related

* [Qemu-devel] [PATCH v1 00/19]: QAPI conversions round 2
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela

This series completes the conversion of current QMP query commands to the
QAPI framework. IOW, with this series applied no single query command will
be building QObjects by hand.

This series also contains two fixes and some cleanups. One of the fixes
solves a problem with the generated code which ignores errors. The other
fixes a missing error declaration in QError.

There are two important details about this series that should be observed:

 1. This is a bit late in the development process. Although there's a lot
    of code churn involved, query commands are relatively simple: most of
    them don't return errors and they don't take parameters. I've also
    tested them as much as I could.

    I'm not saying it's bug-free, but I believe we have enough time for
    fixing any outstanding issues.

 2. Most query commands makes use of QAPI's list type. Unfortunately, the
    simplest way to build a list reverses the order of listings in HMP
    (ie. the "info cpus" command starts at the last CPU). To avoid this,
    I'm building lists by hand the old way for now. In the short term the
    QAPI will be changed to use glib's list support.

 balloon.c                |   72 +-----
 balloon.h                |    6 +-
 block.c                  |  234 ++++++------------
 block.h                  |    5 -
 block_int.h              |    4 +-
 console.h                |    9 -
 cpus.c                   |   45 ++++
 error.c                  |    3 +-
 hmp-commands.hx          |    3 +-
 hmp.c                    |  407 ++++++++++++++++++++++++++++++
 hmp.h                    |   10 +
 hw/pci-stub.c            |   15 +-
 hw/pci.c                 |  322 +++++++++---------------
 hw/pci.h                 |    4 -
 hw/virtio-balloon.c      |   78 +-----
 input.c                  |   64 ++----
 migration.c              |   82 ++-----
 monitor.c                |  313 ++----------------------
 monitor.h                |    2 +
 qapi-schema.json         |  616 ++++++++++++++++++++++++++++++++++++++++++++++
 qerror.c                 |    4 +
 qmp-commands.hx          |   60 +++++-
 qmp.c                    |   27 ++
 scripts/qapi-commands.py |    4 +-
 ui/spice-core.c          |  139 +++++------
 ui/vnc.c                 |  135 +++++++----
 vl.c                     |    2 +-
 27 files changed, 1611 insertions(+), 1054 deletions(-)

^ permalink raw reply

* Re: 3.0.4 kernel oops in i2c ?
From: Josip Rodin @ 2011-10-24 13:26 UTC (permalink / raw)
  To: sparclinux
In-Reply-To: <20111014144345.GB5070@lemon.iwr.uni-heidelberg.de>

On Fri, Oct 14, 2011 at 04:43:45PM +0200, Hermann Lauer wrote:
> when starting 3.0.4 on a V880 a non fatal oops happens when loading
> i2c stuff. Proably there is a problem with i2c on the machine,
> as the rsc "env" cmd shows "E880_FSP: ERROR getting FP stats ---> 9"
> errors. An old 2.6.26-2-sparc64-smp (Debian 2.6.26-26lenny2) kernel
> produces no oops.

Can you try the stable Debian 2.6.32 kernel at least?

Anything that helps you reduce the amount of git bisect...

-- 
     2. That which causes joy or happiness.

^ permalink raw reply

* [PATCH v2] regulator: max8649 Convert max8649 to use regmap api
From: jhbird.choi @ 2011-10-24 13:26 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: Mark Brown, Liam Girdwood, Haojian Zhuang, Jonghwan Choi

From: Jonghwan Choi <jhbird.choi@gmail.com>

Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
---
 drivers/regulator/Kconfig   |    1 +
 drivers/regulator/max8649.c |  155 +++++++++++++++----------------------------
 2 files changed, 56 insertions(+), 100 deletions(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index c7fd2c0..c4f9e1c 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -83,6 +83,7 @@ config REGULATOR_MAX1586
 config REGULATOR_MAX8649
 	tristate "Maxim 8649 voltage regulator"
 	depends on I2C
+	select REGMAP_I2C
 	help
 	  This driver controls a Maxim 8649 voltage output regulator via
 	  I2C bus.
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 30eb9e5..1143bb4 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -16,6 +16,7 @@
 #include <linux/regulator/driver.h>
 #include <linux/slab.h>
 #include <linux/regulator/max8649.h>
+#include <linux/regmap.h>
 
 #define MAX8649_DCDC_VMIN	750000		/* uV */
 #define MAX8649_DCDC_VMAX	1380000		/* uV */
@@ -49,9 +50,8 @@
 
 struct max8649_regulator_info {
 	struct regulator_dev	*regulator;
-	struct i2c_client	*i2c;
 	struct device		*dev;
-	struct mutex		io_lock;
+	struct regmap		*regmap;
 
 	int		vol_reg;
 	unsigned	mode:2;	/* bit[1:0] = VID1, VID0 */
@@ -63,71 +63,6 @@ struct max8649_regulator_info {
 
 /* I2C operations */
 
-static inline int max8649_read_device(struct i2c_client *i2c,
-				      int reg, int bytes, void *dest)
-{
-	unsigned char data;
-	int ret;
-
-	data = (unsigned char)reg;
-	ret = i2c_master_send(i2c, &data, 1);
-	if (ret < 0)
-		return ret;
-	ret = i2c_master_recv(i2c, dest, bytes);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-
-static inline int max8649_write_device(struct i2c_client *i2c,
-				       int reg, int bytes, void *src)
-{
-	unsigned char buf[bytes + 1];
-	int ret;
-
-	buf[0] = (unsigned char)reg;
-	memcpy(&buf[1], src, bytes);
-
-	ret = i2c_master_send(i2c, buf, bytes + 1);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-
-static int max8649_reg_read(struct i2c_client *i2c, int reg)
-{
-	struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
-	unsigned char data;
-	int ret;
-
-	mutex_lock(&info->io_lock);
-	ret = max8649_read_device(i2c, reg, 1, &data);
-	mutex_unlock(&info->io_lock);
-
-	if (ret < 0)
-		return ret;
-	return (int)data;
-}
-
-static int max8649_set_bits(struct i2c_client *i2c, int reg,
-			    unsigned char mask, unsigned char data)
-{
-	struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
-	unsigned char value;
-	int ret;
-
-	mutex_lock(&info->io_lock);
-	ret = max8649_read_device(i2c, reg, 1, &value);
-	if (ret < 0)
-		goto out;
-	value &= ~mask;
-	value |= data;
-	ret = max8649_write_device(i2c, reg, 1, &value);
-out:
-	mutex_unlock(&info->io_lock);
-	return ret;
-}
-
 static inline int check_range(int min_uV, int max_uV)
 {
 	if ((min_uV < MAX8649_DCDC_VMIN) || (max_uV > MAX8649_DCDC_VMAX)
@@ -144,13 +79,14 @@ static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
 static int max8649_get_voltage(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	unsigned char data;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
 		return ret;
-	data = (unsigned char)ret & MAX8649_VOL_MASK;
+	data = (unsigned char)val & MAX8649_VOL_MASK;
 	return max8649_list_voltage(rdev, data);
 }
 
@@ -170,14 +106,14 @@ static int max8649_set_voltage(struct regulator_dev *rdev,
 	mask = MAX8649_VOL_MASK;
 	*selector = data & mask;
 
-	return max8649_set_bits(info->i2c, info->vol_reg, mask, data);
+	return regmap_update_bits(info->regmap, info->vol_reg, mask, data);
 }
 
 /* EN_PD means pulldown on EN input */
 static int max8649_enable(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
-	return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD, 0);
+	return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD, 0);
 }
 
 /*
@@ -187,38 +123,40 @@ static int max8649_enable(struct regulator_dev *rdev)
 static int max8649_disable(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
-	return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD,
+	return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD,
 				MAX8649_EN_PD);
 }
 
 static int max8649_is_enabled(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, MAX8649_CONTROL);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, MAX8649_CONTROL, &val);
+	if (ret != 0)
 		return ret;
-	return !((unsigned char)ret & MAX8649_EN_PD);
+	return !((unsigned char)val & MAX8649_EN_PD);
 }
 
 static int max8649_enable_time(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
 	int voltage, rate, ret;
+	unsigned int val;
 
 	/* get voltage */
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
 		return ret;
-	ret &= MAX8649_VOL_MASK;
+	val &= MAX8649_VOL_MASK;
 	voltage = max8649_list_voltage(rdev, (unsigned char)ret); /* uV */
 
 	/* get rate */
-	ret = max8649_reg_read(info->i2c, MAX8649_RAMP);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, MAX8649_RAMP, &val);
+	if (ret != 0)
 		return ret;
-	ret = (ret & MAX8649_RAMP_MASK) >> 5;
+	ret = (val & MAX8649_RAMP_MASK) >> 5;
 	rate = (32 * 1000) >> ret;	/* uV/uS */
 
 	return (voltage / rate);
@@ -230,12 +168,12 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
 
 	switch (mode) {
 	case REGULATOR_MODE_FAST:
-		max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
-				 MAX8649_FORCE_PWM);
+		regmap_update_bits(info->regmap, info->vol_reg, MAX8649_FORCE_PWM,
+				   MAX8649_FORCE_PWM);
 		break;
 	case REGULATOR_MODE_NORMAL:
-		max8649_set_bits(info->i2c, info->vol_reg,
-				 MAX8649_FORCE_PWM, 0);
+		regmap_update_bits(info->regmap, info->vol_reg,
+				   MAX8649_FORCE_PWM, 0);
 		break;
 	default:
 		return -EINVAL;
@@ -246,10 +184,13 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
 static unsigned int max8649_get_mode(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret & MAX8649_FORCE_PWM)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
+		return ret;
+	if (val & MAX8649_FORCE_PWM)
 		return REGULATOR_MODE_FAST;
 	return REGULATOR_MODE_NORMAL;
 }
@@ -275,11 +216,17 @@ static struct regulator_desc dcdc_desc = {
 	.owner		= THIS_MODULE,
 };
 
+static struct regmap_config max8649_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
 static int __devinit max8649_regulator_probe(struct i2c_client *client,
 					     const struct i2c_device_id *id)
 {
 	struct max8649_platform_data *pdata = client->dev.platform_data;
 	struct max8649_regulator_info *info = NULL;
+	unsigned int val;
 	unsigned char data;
 	int ret;
 
@@ -289,9 +236,14 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 		return -ENOMEM;
 	}
 
-	info->i2c = client;
+	info->regmap = regmap_init_i2c(client, &max8649_regmap_config);
+	if (IS_ERR(info->regmap)) {
+		ret = PTR_ERR(info->regmap);
+		dev_err(&client->dev, "Failed to allocate register map: %d\n", ret);
+		goto fail;
+	}
+
 	info->dev = &client->dev;
-	mutex_init(&info->io_lock);
 	i2c_set_clientdata(client, info);
 
 	info->mode = pdata->mode;
@@ -312,8 +264,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 		break;
 	}
 
-	ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
-	if (ret < 0) {
+	ret = regmap_read(info->regmap, MAX8649_CHIP_ID1, &val);
+	if (ret != 0) {
 		dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
 			ret);
 		goto out;
@@ -321,29 +273,29 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 	dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
 
 	/* enable VID0 & VID1 */
-	max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
+	regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
 
 	/* enable/disable external clock synchronization */
 	info->extclk = pdata->extclk;
 	data = (info->extclk) ? MAX8649_SYNC_EXTCLK : 0;
-	max8649_set_bits(info->i2c, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
+	regmap_update_bits(info->regmap, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
 	if (info->extclk) {
 		/* set external clock frequency */
 		info->extclk_freq = pdata->extclk_freq;
-		max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
-				 info->extclk_freq << 6);
+		regmap_update_bits(info->regmap, MAX8649_SYNC, MAX8649_EXT_MASK,
+				   info->extclk_freq << 6);
 	}
 
 	if (pdata->ramp_timing) {
 		info->ramp_timing = pdata->ramp_timing;
-		max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_MASK,
-				 info->ramp_timing << 5);
+		regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_MASK,
+				   info->ramp_timing << 5);
 	}
 
 	info->ramp_down = pdata->ramp_down;
 	if (info->ramp_down) {
-		max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_DOWN,
-				 MAX8649_RAMP_DOWN);
+		regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_DOWN,
+				   MAX8649_RAMP_DOWN);
 	}
 
 	info->regulator = regulator_register(&dcdc_desc, &client->dev,
@@ -358,6 +310,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 	dev_info(info->dev, "Max8649 regulator device is detected.\n");
 	return 0;
 out:
+	regmap_exit(info->regmap);
+fail:
 	kfree(info);
 	return ret;
 }
@@ -369,6 +323,7 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client)
 	if (info) {
 		if (info->regulator)
 			regulator_unregister(info->regulator);
+		regmap_exit(info->regmap);
 		kfree(info);
 	}
 
-- 
1.7.1


^ permalink raw reply related

* [PATCH v2] regulator: max8649 Convert max8649 to use regmap api
From: jhbird.choi at gmail.com @ 2011-10-24 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jonghwan Choi <jhbird.choi@gmail.com>

Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
---
 drivers/regulator/Kconfig   |    1 +
 drivers/regulator/max8649.c |  155 +++++++++++++++----------------------------
 2 files changed, 56 insertions(+), 100 deletions(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index c7fd2c0..c4f9e1c 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -83,6 +83,7 @@ config REGULATOR_MAX1586
 config REGULATOR_MAX8649
 	tristate "Maxim 8649 voltage regulator"
 	depends on I2C
+	select REGMAP_I2C
 	help
 	  This driver controls a Maxim 8649 voltage output regulator via
 	  I2C bus.
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 30eb9e5..1143bb4 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -16,6 +16,7 @@
 #include <linux/regulator/driver.h>
 #include <linux/slab.h>
 #include <linux/regulator/max8649.h>
+#include <linux/regmap.h>
 
 #define MAX8649_DCDC_VMIN	750000		/* uV */
 #define MAX8649_DCDC_VMAX	1380000		/* uV */
@@ -49,9 +50,8 @@
 
 struct max8649_regulator_info {
 	struct regulator_dev	*regulator;
-	struct i2c_client	*i2c;
 	struct device		*dev;
-	struct mutex		io_lock;
+	struct regmap		*regmap;
 
 	int		vol_reg;
 	unsigned	mode:2;	/* bit[1:0] = VID1, VID0 */
@@ -63,71 +63,6 @@ struct max8649_regulator_info {
 
 /* I2C operations */
 
-static inline int max8649_read_device(struct i2c_client *i2c,
-				      int reg, int bytes, void *dest)
-{
-	unsigned char data;
-	int ret;
-
-	data = (unsigned char)reg;
-	ret = i2c_master_send(i2c, &data, 1);
-	if (ret < 0)
-		return ret;
-	ret = i2c_master_recv(i2c, dest, bytes);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-
-static inline int max8649_write_device(struct i2c_client *i2c,
-				       int reg, int bytes, void *src)
-{
-	unsigned char buf[bytes + 1];
-	int ret;
-
-	buf[0] = (unsigned char)reg;
-	memcpy(&buf[1], src, bytes);
-
-	ret = i2c_master_send(i2c, buf, bytes + 1);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-
-static int max8649_reg_read(struct i2c_client *i2c, int reg)
-{
-	struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
-	unsigned char data;
-	int ret;
-
-	mutex_lock(&info->io_lock);
-	ret = max8649_read_device(i2c, reg, 1, &data);
-	mutex_unlock(&info->io_lock);
-
-	if (ret < 0)
-		return ret;
-	return (int)data;
-}
-
-static int max8649_set_bits(struct i2c_client *i2c, int reg,
-			    unsigned char mask, unsigned char data)
-{
-	struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
-	unsigned char value;
-	int ret;
-
-	mutex_lock(&info->io_lock);
-	ret = max8649_read_device(i2c, reg, 1, &value);
-	if (ret < 0)
-		goto out;
-	value &= ~mask;
-	value |= data;
-	ret = max8649_write_device(i2c, reg, 1, &value);
-out:
-	mutex_unlock(&info->io_lock);
-	return ret;
-}
-
 static inline int check_range(int min_uV, int max_uV)
 {
 	if ((min_uV < MAX8649_DCDC_VMIN) || (max_uV > MAX8649_DCDC_VMAX)
@@ -144,13 +79,14 @@ static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
 static int max8649_get_voltage(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	unsigned char data;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
 		return ret;
-	data = (unsigned char)ret & MAX8649_VOL_MASK;
+	data = (unsigned char)val & MAX8649_VOL_MASK;
 	return max8649_list_voltage(rdev, data);
 }
 
@@ -170,14 +106,14 @@ static int max8649_set_voltage(struct regulator_dev *rdev,
 	mask = MAX8649_VOL_MASK;
 	*selector = data & mask;
 
-	return max8649_set_bits(info->i2c, info->vol_reg, mask, data);
+	return regmap_update_bits(info->regmap, info->vol_reg, mask, data);
 }
 
 /* EN_PD means pulldown on EN input */
 static int max8649_enable(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
-	return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD, 0);
+	return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD, 0);
 }
 
 /*
@@ -187,38 +123,40 @@ static int max8649_enable(struct regulator_dev *rdev)
 static int max8649_disable(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
-	return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD,
+	return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD,
 				MAX8649_EN_PD);
 }
 
 static int max8649_is_enabled(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, MAX8649_CONTROL);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, MAX8649_CONTROL, &val);
+	if (ret != 0)
 		return ret;
-	return !((unsigned char)ret & MAX8649_EN_PD);
+	return !((unsigned char)val & MAX8649_EN_PD);
 }
 
 static int max8649_enable_time(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
 	int voltage, rate, ret;
+	unsigned int val;
 
 	/* get voltage */
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
 		return ret;
-	ret &= MAX8649_VOL_MASK;
+	val &= MAX8649_VOL_MASK;
 	voltage = max8649_list_voltage(rdev, (unsigned char)ret); /* uV */
 
 	/* get rate */
-	ret = max8649_reg_read(info->i2c, MAX8649_RAMP);
-	if (ret < 0)
+	ret = regmap_read(info->regmap, MAX8649_RAMP, &val);
+	if (ret != 0)
 		return ret;
-	ret = (ret & MAX8649_RAMP_MASK) >> 5;
+	ret = (val & MAX8649_RAMP_MASK) >> 5;
 	rate = (32 * 1000) >> ret;	/* uV/uS */
 
 	return (voltage / rate);
@@ -230,12 +168,12 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
 
 	switch (mode) {
 	case REGULATOR_MODE_FAST:
-		max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
-				 MAX8649_FORCE_PWM);
+		regmap_update_bits(info->regmap, info->vol_reg, MAX8649_FORCE_PWM,
+				   MAX8649_FORCE_PWM);
 		break;
 	case REGULATOR_MODE_NORMAL:
-		max8649_set_bits(info->i2c, info->vol_reg,
-				 MAX8649_FORCE_PWM, 0);
+		regmap_update_bits(info->regmap, info->vol_reg,
+				   MAX8649_FORCE_PWM, 0);
 		break;
 	default:
 		return -EINVAL;
@@ -246,10 +184,13 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
 static unsigned int max8649_get_mode(struct regulator_dev *rdev)
 {
 	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+	unsigned int val;
 	int ret;
 
-	ret = max8649_reg_read(info->i2c, info->vol_reg);
-	if (ret & MAX8649_FORCE_PWM)
+	ret = regmap_read(info->regmap, info->vol_reg, &val);
+	if (ret != 0)
+		return ret;
+	if (val & MAX8649_FORCE_PWM)
 		return REGULATOR_MODE_FAST;
 	return REGULATOR_MODE_NORMAL;
 }
@@ -275,11 +216,17 @@ static struct regulator_desc dcdc_desc = {
 	.owner		= THIS_MODULE,
 };
 
+static struct regmap_config max8649_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
 static int __devinit max8649_regulator_probe(struct i2c_client *client,
 					     const struct i2c_device_id *id)
 {
 	struct max8649_platform_data *pdata = client->dev.platform_data;
 	struct max8649_regulator_info *info = NULL;
+	unsigned int val;
 	unsigned char data;
 	int ret;
 
@@ -289,9 +236,14 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 		return -ENOMEM;
 	}
 
-	info->i2c = client;
+	info->regmap = regmap_init_i2c(client, &max8649_regmap_config);
+	if (IS_ERR(info->regmap)) {
+		ret = PTR_ERR(info->regmap);
+		dev_err(&client->dev, "Failed to allocate register map: %d\n", ret);
+		goto fail;
+	}
+
 	info->dev = &client->dev;
-	mutex_init(&info->io_lock);
 	i2c_set_clientdata(client, info);
 
 	info->mode = pdata->mode;
@@ -312,8 +264,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 		break;
 	}
 
-	ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
-	if (ret < 0) {
+	ret = regmap_read(info->regmap, MAX8649_CHIP_ID1, &val);
+	if (ret != 0) {
 		dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
 			ret);
 		goto out;
@@ -321,29 +273,29 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 	dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
 
 	/* enable VID0 & VID1 */
-	max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
+	regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
 
 	/* enable/disable external clock synchronization */
 	info->extclk = pdata->extclk;
 	data = (info->extclk) ? MAX8649_SYNC_EXTCLK : 0;
-	max8649_set_bits(info->i2c, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
+	regmap_update_bits(info->regmap, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
 	if (info->extclk) {
 		/* set external clock frequency */
 		info->extclk_freq = pdata->extclk_freq;
-		max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
-				 info->extclk_freq << 6);
+		regmap_update_bits(info->regmap, MAX8649_SYNC, MAX8649_EXT_MASK,
+				   info->extclk_freq << 6);
 	}
 
 	if (pdata->ramp_timing) {
 		info->ramp_timing = pdata->ramp_timing;
-		max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_MASK,
-				 info->ramp_timing << 5);
+		regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_MASK,
+				   info->ramp_timing << 5);
 	}
 
 	info->ramp_down = pdata->ramp_down;
 	if (info->ramp_down) {
-		max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_DOWN,
-				 MAX8649_RAMP_DOWN);
+		regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_DOWN,
+				   MAX8649_RAMP_DOWN);
 	}
 
 	info->regulator = regulator_register(&dcdc_desc, &client->dev,
@@ -358,6 +310,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
 	dev_info(info->dev, "Max8649 regulator device is detected.\n");
 	return 0;
 out:
+	regmap_exit(info->regmap);
+fail:
 	kfree(info);
 	return ret;
 }
@@ -369,6 +323,7 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client)
 	if (info) {
 		if (info->regulator)
 			regulator_unregister(info->regulator);
+		regmap_exit(info->regmap);
 		kfree(info);
 	}
 
-- 
1.7.1

^ permalink raw reply related

* Re: [CONSOLIDATED PULL 11/27] pulseaudio-0.9.23: inherit perlnative to work around build on host without XML/Parser.pm
From: Koen Kooi @ 2011-10-24 13:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <1319462157.25011.1.camel@ted>


Op 24 okt. 2011, om 15:15 heeft Richard Purdie het volgende geschreven:

> On Sun, 2011-10-23 at 11:26 -0700, Saul Wold wrote:
>> From: Martin Jansa <Martin.Jansa@gmail.com>
>> 
>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> ---
>> .../pulseaudio/pulseaudio_0.9.23.bb                |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> index 33f5e15..4ac2418 100644
>> --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> @@ -4,7 +4,7 @@ PR = "r5"
>> 
>> DEPENDS += "gdbm speex"
>> 
>> -inherit gettext
>> +inherit gettext perlnative
> 
> This doesn't look right. If we need xmlparser, we should state that in
> DEPENDS. If that is added to DEPENDS, I'm not sure we still need the
> inherit of perlnative?

If you need xmlparser during the build you almost always need the perlnative wrapper as well :(

regards,

Koen


^ permalink raw reply

* [U-Boot] Accessing MC13783 RTC registers
From: Marek Vasut @ 2011-10-24 13:24 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <CAOMZO5B0uMjJNXOvjt4UOFi1Afvrp1tviJ_-yrunp+9VXcqYaQ@mail.gmail.com>

> Hi,
> 
> Running U-boot from top of tree imx git I get the following when
> trying to access the MC13783 RTC registers via 'date' command:
> 
> MX31PDK U-Boot > date
> <reg num> = 22 is invalid. Should be less than 0
> ## Get date failed
> 

Fabio,

is it possibly connected via i2c?

Cheers

^ permalink raw reply

* Re: [CONSOLIDATED PULL 26/27] abiword: convert to svn
From: Koen Kooi @ 2011-10-24 13:18 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <1319462069.25011.0.camel@ted>


Op 24 okt. 2011, om 15:14 heeft Richard Purdie het volgende geschreven:

> On Sun, 2011-10-23 at 11:27 -0700, Saul Wold wrote:
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>> meta-demoapps/recipes-gnome/abiword/abiword.inc    |    4 ++--
>> meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb |   10 ----------
>> meta-demoapps/recipes-gnome/abiword/abiword_svn.bb |   10 ++++++++++
>> 3 files changed, 12 insertions(+), 12 deletions(-)
>> delete mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb
>> create mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_svn.bb
>> 
>> diff --git a/meta-demoapps/recipes-gnome/abiword/abiword.inc b/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> index b1b0f67..2b34a7a 100644
>> --- a/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> +++ b/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> @@ -13,8 +13,8 @@ RRECOMMENDS_${PN}    = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
>> RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
>> RELSRC = "${WORKDIR}/abiword-${PV}/abi"
>> 
>> -CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi"
>> -CVSSRC = "${WORKDIR}/abi"
>> +SVNURI = "cvs://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
>> +SVNSRC = "${WORKDIR}/abi"
>> 
> Er, its still using cvs:// ?!

The whole abiword section is outdated, it has 2.5.2 which was released on 21-Aug-2007, latest is 2.8.6 released on 13-Jun-2010. I have an uncommited update in meta-oe to update abiword to 2.8.6, need to clean that up.

regards,

Koen





^ permalink raw reply

* [PATCH] gpiolib: Ensure struct gpio is always defined
From: Mark Brown @ 2011-10-24 13:24 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-kernel, patches, Mark Brown

Currently struct gpio is only defined when using gpiolib which makes the
stub gpio_request_array() much less useful in drivers than is ideal as
they can't work with struct gpio.  Since there are no other definitions
in kernel instead make the define always available no matter if gpiolib
is selectable or selected, ensuring that drivers can always use the
type.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

flob
---
 include/asm-generic/gpio.h |   12 ------------
 include/linux/gpio.h       |   22 ++++++++++++----------
 2 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d494001..d0b6423 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -170,18 +170,6 @@ extern int __gpio_cansleep(unsigned gpio);
 
 extern int __gpio_to_irq(unsigned gpio);
 
-/**
- * struct gpio - a structure describing a GPIO with configuration
- * @gpio:	the GPIO number
- * @flags:	GPIO configuration as specified by GPIOF_*
- * @label:	a literal description string of this GPIO
- */
-struct gpio {
-	unsigned	gpio;
-	unsigned long	flags;
-	const char	*label;
-};
-
 extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
 extern int gpio_request_array(const struct gpio *array, size_t num);
 extern void gpio_free_array(const struct gpio *array, size_t num);
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 17b5a0d..38ac48b 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -14,6 +14,18 @@
 #define GPIOF_OUT_INIT_LOW	(GPIOF_DIR_OUT | GPIOF_INIT_LOW)
 #define GPIOF_OUT_INIT_HIGH	(GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
 
+/**
+ * struct gpio - a structure describing a GPIO with configuration
+ * @gpio:	the GPIO number
+ * @flags:	GPIO configuration as specified by GPIOF_*
+ * @label:	a literal description string of this GPIO
+ */
+struct gpio {
+	unsigned	gpio;
+	unsigned long	flags;
+	const char	*label;
+};
+
 #ifdef CONFIG_GENERIC_GPIO
 #include <asm/gpio.h>
 
@@ -24,18 +36,8 @@
 #include <linux/errno.h>
 
 struct device;
-struct gpio;
 struct gpio_chip;
 
-/*
- * Some platforms don't support the GPIO programming interface.
- *
- * In case some driver uses it anyway (it should normally have
- * depended on GENERIC_GPIO), these routines help the compiler
- * optimize out much GPIO-related code ... or trigger a runtime
- * warning when something is wrongly called.
- */
-
 static inline bool gpio_is_valid(int number)
 {
 	return false;
-- 
1.7.6.3


^ permalink raw reply related

* [ath9k-devel] Maybe a bug somewhere in the WIFI driver
From: Mohammed Shafi @ 2011-10-24 13:23 UTC (permalink / raw)
  To: ath9k-devel
In-Reply-To: <4ea5511c.cf3cd80a.686e.ffff951cSMTPIN_ADDED@mx.google.com>

On Mon, Oct 24, 2011 at 5:20 PM, BARRAL Adrien
<adrien.barral@robopec.com> wrote:
> Hi Shafi,
>
> I think the bug was corrected.
> I installed compat-wireless 2011-10-10 and since, no freeze happens.

thank you very much for trying it out. (added ath9k list)

>
> Thank you very much.
>
> Regards,
> Adrien BARRAL
>
> -----Message d'origine-----
> De?: Mohammed Shafi [mailto:shafi.wireless at gmail.com]
> Envoy??: mercredi 12 octobre 2011 06:20
> ??: BARRAL Adrien
> Cc?: ath9k-devel at lists.ath9k.org
> Objet?: Re: [ath9k-devel] Maybe a bug somewhere in the WIFI driver
>
> On Tue, Oct 11, 2011 at 9:29 PM, BARRAL Adrien
> <adrien.barral@robopec.com> wrote:
>> Hello,
>>
>>
>>
>> Here is a description of my system :
>>
>> Linux : 2.6.35-22-generic (on a ubuntu 10.04 LTS)
>>
>> My wifi card is : 02:00.0 Network controller: Atheros Communications Inc.
>> AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
>>
>> "dmesg" outputs about the wifi controller are :
>>
>> Oct 10 17:28:49 kernel: [?? 12.546288] ath9k 0000:02:00.0: PCI INT A ->
> GSI
>> 17 (level, low) -> IRQ 17
>>
>> Oct 10 17:28:49 kernel: [?? 12.606040] HDA Intel 0000:00:1b.0: PCI INT A
> ->
>> GSI 16 (level, low) -> IRQ 16
>>
>> Oct 10 17:28:49 kernel: [?? 12.653486] phy0: Atheros AR9285 Rev:2
>> mem=0xf8e60000, irq=17
>>
>>
>>
>> I am using an atheros Wifi Card in ad-hoc mode, I create my ad-hoc network
>> with two differents ways :
>>
>> 1. Thanks to the following commands :
>>
>> ??????????????? ifconfig wlan2 down
>>
>> ??????????????? iwconfig wlan2 mode Ad-Hoc
>>
>> ??????????????? iwconfig wlan2 essid "Toto"
>>
>> ??????????????? ifconfig wlan2 up
>>
>> 2. Thanks to the ubuntu network manager "Create a New Network" function's.
>>
>>
>>
>> The way I use to create the network doesn't matter.
>>
>>
>>
>> A few minutes after the AdHoc network is created, my system freeze. I have
>> got the following message in /var/log/kernel :
>>
>>
>>
>> ----------------- START OF MESSAGE ------------------
>>
>> Oct 11 09:44:52 kernel: [? 840.290670] BUG: unable to handle kernel NULL
>> pointer dereference at 00000080
>>
>> Oct 11 09:44:52 kernel: [? 840.290682] IP: [<c020cb7c>]
>> __kmalloc_track_caller+0x6c/0x170
>>
>> Oct 11 09:44:52 kernel: [? 840.290697] *pde = 7e630067
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290703] Oops: 0000 [#1] SMP
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290709] last sysfs file:
>> /sys/devices/pci0000:00/0000:00:1e.0/0000:04:0b.0/local_cpus
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290716] Modules linked in: ipt_MASQUERADE
>> xt_state ipt_REJECT xt_tcpudp iptable_filter nf_nat_h323 nf_conntrack_h323
>> nf_nat_pptp nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_proto_gre
>> nf_nat_tftp nf_conntrack_tftp nf_nat_sip nf_conntrack_sip nf_nat_irc
>> nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp iptable_nat nf_nat
>> nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables
>> nls_iso8859_1 nls_cp437 vfat fat parport_pc ppdev snd_hda_codec_nvhdmi
>> binfmt_misc snd_hda_codec_realtek snd_hda_intel snd_hda_codec nvidia(P)
> arc4
>> snd_usb_audio ath9k snd_hwdep snd_usbmidi_lib snd_pcm ath9k_common
>> snd_seq_midi ath9k_hw joydev snd_rawmidi ath mac80211 snd_seq_midi_event
>> snd_seq snd_timer usbhid snd_seq_device cfg80211 uvcvideo intel_agp
>> usb_storage hid snd cdc_acm psmouse videodev v4l1_compat led_class
> serio_raw
>> coretemp xhci_hcd agpgart soundcore snd_page_alloc lp parport r8169 mii
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290822]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290829] Pid: 757, comm: phy0 Tainted:
>> P??????????? 2.6.35-22-generic #33-Ubuntu To be filled by O.E.M./To Be
>> Filled By O.E.M.
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290837] EIP: 0060:[<c020cb7c>] EFLAGS:
>> 00010002 CPU: 3
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290844] EIP is at
>> __kmalloc_track_caller+0x6c/0x170
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290849] EAX: c2705aec EBX: c07c6888 ECX:
>> c07c6888 EDX: 00000000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290854] ESI: 000000d0 EDI: 00000080 EBP:
>> f3f6bebc ESP: f3f6be94
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290860]? DS: 007b ES: 007b FS: 00d8 GS:
>> 00e0 SS: 0068
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290866] Process phy0 (pid: 757,
> ti=f3f6a000
>> task=f3ec3f70 task.ti=f3f6a000)
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290870] Stack:
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290874]? c2705a98 00000000 c04ece6e
>> c04eddf8 00000246 000000d0 000001c4 f35b5300
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290886] <0> 000000d0 000000ff f3f6bedc
>> c04ece98 c07c64d0 00000000 000000c0 f35b9000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290900] <0> 00000000 f080d000 f3f6bef8
>> c04eddf8 ffffffff f080d000 f3dc8480 00000000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290914] Call Trace:
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290924]? [<c04ece6e>] ?
>> __alloc_skb+0x2e/0x100
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290931]? [<c04eddf8>] ?
> skb_copy+0x38/0x90
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290938]? [<c04ece98>] ?
>> __alloc_skb+0x58/0x100
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290944]? [<c04eddf8>] ?
> skb_copy+0x38/0x90
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290976]? [<f8e3714d>] ?
>> ieee80211_rx_mgmt_probe_req+0xed/0x130 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291004]? [<f8e3810d>] ?
>> ieee80211_ibss_rx_queued_mgmt+0x3d/0xf0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291012]? [<c04ec5c0>] ?
>> skb_dequeue+0x50/0x70
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291039]? [<f8e38211>] ?
>> ieee80211_ibss_work+0x51/0xd0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291049]? [<c0161a4e>] ?
>> run_workqueue+0x8e/0x150
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291075]? [<f8e381c0>] ?
>> ieee80211_ibss_work+0x0/0xd0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291084]? [<c0161b94>] ?
>> worker_thread+0x84/0xe0
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291092]? [<c0165e10>] ?
>> autoremove_wake_function+0x0/0x50
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291099]? [<c0161b10>] ?
>> worker_thread+0x0/0xe0
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291106]? [<c01659e4>] ? kthread+0x74/0x80
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291112]? [<c0165970>] ? kthread+0x0/0x80
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291120]? [<c010363e>] ?
>> kernel_thread_helper+0x6/0x10
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291123] Code: ec 75 5c 9c 58 8d 74 26 00
> 89
>> 45 e8 fa 90 8d 74 26 00 64 8b 15 54 e0 8b c0 8b 03 8d 04 02 8b 38 85 ff 0f
>> 84 99 00 00 00 8b 53 10 <8b> 14 17 89 10 8b 45 e8 50 9d 8d 74 26 00 85 ff
> 75
>> 2a 8b 0d e4
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291196] EIP: [<c020cb7c>]
>> __kmalloc_track_caller+0x6c/0x170 SS:ESP 0068:f3f6be94
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291206] CR2: 0000000000000080
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291212] ---[ end trace 34d01f410e93db66
>> ]---
>>
>> ----------------- END OF MESSAGE ------------------
>>
>>
>>
>> Of course this message is only the call trace of the wifi driver, all
>> process running on the system generate a call trace. I am almost certain
>> that the problem come from the WiFi in AdHoc mode, because if I disable
> this
>> feature my system never freeze !
>>
>>
>>
>> I will try with a newer kernel, but I read all the changelog from the
> 2.6.35
>> to 3.0, and I haven't seen any fix about my problem, so I don't think this
>> bug was fixed...
>
> please let us know if this issue occurs in the latest compat build
> http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge
> i just tried the same in my 3.1.0rc8- wireless-testing, no freeze
> happened... may be i would have missed something
> please disable network-manager(sudo service network-manager stop)
> before configuring with command
> may be the freeze can occur with the network manager enabled and we
> are trying to create an ad-hoc mode
>
>>
>>
>>
>> Any help will be very appreciated,
>>
>>
>>
>> Best regads,
>>
>> Adrien BARRAL.
>> Robopec.
>>
>>
>>
>> _______________________________________________
>> ath9k-devel mailing list
>> ath9k-devel at lists.ath9k.org
>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>
>>
>
>
>
> --
> shafi
>
>
>



-- 
shafi

^ permalink raw reply

* Re: [PATCH v2 1/2] irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip
From: Grant Likely @ 2011-10-24 13:23 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu; +Cc: tglx, linux-kernel, mingo
In-Reply-To: <1318817327-4589-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>

On Mon, Oct 17, 2011 at 11:08:46AM +0900, Nobuhiro Iwamatsu wrote:
> Some functions of irq generic-chip is undefined, because
> EXPORT_SYMBOL_GPL is not set to these.
> 
> -----
> ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
> ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
> ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!
> ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!
> -----
> 
> This is revised that EXPORT_SYMBOL_GPL can be added and referred
> to in functions.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>

After getting verbal ack from Thomas, I've merged this via the gpio tree.

g.

> ---
> 
> V2: Add EXPORT_SYMBOL_GPL to irq_setup_generic_chip, irq_alloc_generic_chip,
> irq_setup_alt_chip and irq_remove_generic_chip only.
> 
>  kernel/irq/generic-chip.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
> index e38544d..6cb7613 100644
> --- a/kernel/irq/generic-chip.c
> +++ b/kernel/irq/generic-chip.c
> @@ -211,6 +211,7 @@ irq_alloc_generic_chip(const char *name, int num_ct, unsigned int irq_base,
>  	}
>  	return gc;
>  }
> +EXPORT_SYMBOL_GPL(irq_alloc_generic_chip);
>  
>  /*
>   * Separate lockdep class for interrupt chip which can nest irq_desc
> @@ -258,6 +259,7 @@ void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk,
>  	}
>  	gc->irq_cnt = i - gc->irq_base;
>  }
> +EXPORT_SYMBOL_GPL(irq_setup_generic_chip);
>  
>  /**
>   * irq_setup_alt_chip - Switch to alternative chip
> @@ -281,6 +283,7 @@ int irq_setup_alt_chip(struct irq_data *d, unsigned int type)
>  	}
>  	return -EINVAL;
>  }
> +EXPORT_SYMBOL_GPL(irq_setup_alt_chip);
>  
>  /**
>   * irq_remove_generic_chip - Remove a chip
> @@ -311,6 +314,7 @@ void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk,
>  		irq_modify_status(i, clr, set);
>  	}
>  }
> +EXPORT_SYMBOL_GPL(irq_remove_generic_chip);
>  
>  #ifdef CONFIG_PM
>  static int irq_gc_suspend(void)
> -- 
> 1.7.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply

* Re: [BUG] Invalid file descriptor.
From: Daniel Wagner @ 2011-10-24 13:23 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth
In-Reply-To: <CAMOw1v6Ec=GXvp3nZWa0=vALwWguXO3uo_DHqRJMXyV=_htO_w@mail.gmail.com>

Hi Lucas,

On 10/24/2011 03:19 PM, Lucas De Marchi wrote:
> On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner<wagi@monom.org>  wrote:
>> To whom it might concern,
>>
>> if bluez is running without an agent and the remote device tries to connect
>> to bluez you are able to trigger the "Invalid file descriptor".
>>
>>
>> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
>> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
>> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
>> status 0x00
>> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>>
>> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>>
>> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
>> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
>> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>>
>>
>> cheers,
>> daniel
>>
>> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
>> very capable finding bugs :)
>
> What about the patch?

Sure, I will do as soon I have fixed all outstanding ConnMan bugs I 
found just recently. In other words don't expect very soon this patch :)

cheers,
daniel

^ permalink raw reply

* [Bug 42117] R200 driver performance, UMS, all mesa versions from 7.6
From: bugzilla-daemon @ 2011-10-24 13:22 UTC (permalink / raw)
  To: dri-devel
In-Reply-To: <bug-42117-502@http.bugs.freedesktop.org/>

https://bugs.freedesktop.org/show_bug.cgi?id=42117

--- Comment #2 from Alex Deucher <agd5f@yahoo.com> 2011-10-24 06:22:51 PDT ---
Is there some reason why you want to use UMS?  It's not really supported any
more.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply

* Re: [CONSOLIDATED PULL 11/27] pulseaudio-0.9.23: inherit perlnative to work around build on host without XML/Parser.pm
From: Richard Purdie @ 2011-10-24 13:15 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <6038b7e0961ca4aec70cc6de8adbc79567500e2b.1319394187.git.sgw@linux.intel.com>

On Sun, 2011-10-23 at 11:26 -0700, Saul Wold wrote:
> From: Martin Jansa <Martin.Jansa@gmail.com>
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  .../pulseaudio/pulseaudio_0.9.23.bb                |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> index 33f5e15..4ac2418 100644
> --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> @@ -4,7 +4,7 @@ PR = "r5"
>  
>  DEPENDS += "gdbm speex"
>  
> -inherit gettext
> +inherit gettext perlnative

This doesn't look right. If we need xmlparser, we should state that in
DEPENDS. If that is added to DEPENDS, I'm not sure we still need the
inherit of perlnative?

Cheers,

Richard




^ permalink raw reply

* [PATCH] Shrink thread_info a bit
From: Russell King - ARM Linux @ 2011-10-24 13:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20111024131853.GA4250@mudshark.cambridge.arm.com>

On Mon, Oct 24, 2011 at 02:18:53PM +0100, Will Deacon wrote:
> Hi Russell,
> 
> On Mon, Oct 24, 2011 at 01:48:18PM +0100, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
> > index 7b5cc8d..a030be7 100644
> > --- a/arch/arm/include/asm/thread_info.h
> > +++ b/arch/arm/include/asm/thread_info.h
> > @@ -59,7 +59,9 @@ struct thread_info {
> >  	__u32			syscall;	/* syscall number */
> >  	__u8			used_cp[16];	/* thread used copro */
> >  	unsigned long		tp_value;
> > +#ifdef CONFIG_CRUNCH
> >  	struct crunch_state	crunchstate;
> > +#endif
> >  	union fp_state		fpstate __attribute__((aligned(8)));
> 
> Can we also shrink the contents of fp_state when AEABI && !OABI_COMPAT?
> It's slightly more involved as ptrace and core-dumping would need some
> similar treatment. We probably need to keep the union kicking around
> though, since the iwmmxt state is held in there.

This patch is the nice easy bit - doing the same with the fpstate would
be much more involved because thre's also bits of assembly which would
be impacted as well.

^ permalink raw reply

* Re: [CONSOLIDATED PULL 26/27] abiword: convert to svn
From: Richard Purdie @ 2011-10-24 13:14 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <dfc5efb4c54797a39c2471dfba7b7cbf14fb6476.1319394187.git.sgw@linux.intel.com>

On Sun, 2011-10-23 at 11:27 -0700, Saul Wold wrote:
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta-demoapps/recipes-gnome/abiword/abiword.inc    |    4 ++--
>  meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb |   10 ----------
>  meta-demoapps/recipes-gnome/abiword/abiword_svn.bb |   10 ++++++++++
>  3 files changed, 12 insertions(+), 12 deletions(-)
>  delete mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb
>  create mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_svn.bb
> 
> diff --git a/meta-demoapps/recipes-gnome/abiword/abiword.inc b/meta-demoapps/recipes-gnome/abiword/abiword.inc
> index b1b0f67..2b34a7a 100644
> --- a/meta-demoapps/recipes-gnome/abiword/abiword.inc
> +++ b/meta-demoapps/recipes-gnome/abiword/abiword.inc
> @@ -13,8 +13,8 @@ RRECOMMENDS_${PN}    = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
>  RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
>  RELSRC = "${WORKDIR}/abiword-${PV}/abi"
>  
> -CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi"
> -CVSSRC = "${WORKDIR}/abi"
> +SVNURI = "cvs://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
> +SVNSRC = "${WORKDIR}/abi"
>  
Er, its still using cvs:// ?!

Cheers,

Richard




^ permalink raw reply

* Re: [BUG] Invalid file descriptor.
From: Lucas De Marchi @ 2011-10-24 13:19 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: linux-bluetooth
In-Reply-To: <4EA564C1.8070402@monom.org>

Hi Daniel,

On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner <wagi@monom.org> wrote:
> To whom it might concern,
>
> if bluez is running without an agent and the remote device tries to connect
> to bluez you are able to trigger the "Invalid file descriptor".
>
>
> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
> status 0x00
> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>
> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>
> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>
>
> cheers,
> daniel
>
> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
> very capable finding bugs :)

What about the patch?


Lucas De Marchi

^ permalink raw reply

* [PATCH] Shrink thread_info a bit
From: Will Deacon @ 2011-10-24 13:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20111024124818.GA17693@n2100.arm.linux.org.uk>

Hi Russell,

On Mon, Oct 24, 2011 at 01:48:18PM +0100, Russell King - ARM Linux wrote:
> diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
> index 7b5cc8d..a030be7 100644
> --- a/arch/arm/include/asm/thread_info.h
> +++ b/arch/arm/include/asm/thread_info.h
> @@ -59,7 +59,9 @@ struct thread_info {
>  	__u32			syscall;	/* syscall number */
>  	__u8			used_cp[16];	/* thread used copro */
>  	unsigned long		tp_value;
> +#ifdef CONFIG_CRUNCH
>  	struct crunch_state	crunchstate;
> +#endif
>  	union fp_state		fpstate __attribute__((aligned(8)));

Can we also shrink the contents of fp_state when AEABI && !OABI_COMPAT?
It's slightly more involved as ptrace and core-dumping would need some
similar treatment. We probably need to keep the union kicking around
though, since the iwmmxt state is held in there.

Will

^ permalink raw reply

* [U-Boot] Accessing MC13783 RTC registers
From: Fabio Estevam @ 2011-10-24 13:18 UTC (permalink / raw)
  To: u-boot

Hi,

Running U-boot from top of tree imx git I get the following when
trying to access the MC13783 RTC registers via 'date' command:

MX31PDK U-Boot > date
<reg num> = 22 is invalid. Should be less than 0
## Get date failed

Does anyone else see this same problem on other boards?

Regards,

Fabio Estevam

^ permalink raw reply

* Re: NFS4 BAD_STATEID loop (kernel 3.0)
From: David Flynn @ 2011-10-24 13:17 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: David Flynn, linux-nfs
In-Reply-To: <1319455367.8505.3.camel@lade.trondhjem.org>

* Trond Myklebust (Trond.Myklebust@netapp.com) wrote:
> We should in principle be able to recover a BAD_STATEID error by running
> the state recovery thread. It's a shame that the machine was rebooted,
> but does your syslog trace perhaps show any state recovery thread
> errors?

There were no other nfs related messages reported between the initial
blocked task and rebooting the machine later.  Additionally, there were
no nfs related messages from bootup of the machine until the blocked
task.

One thing that may be of interest is that the user in question with the
blocked task had hit their quota hard limit.  (It was the same user that
had the issue i reported earlier too on the same filesystem).

Kind regards,
..david

^ permalink raw reply

* Re: [PATCH] gpiolib: Provide a definition of struct gpio for the stub gpiolib
From: Mark Brown @ 2011-10-24 13:17 UTC (permalink / raw)
  To: Grant Likely; +Cc: Grant Likely, linux-kernel
In-Reply-To: <20111024125449.GT8708@ponder.secretlab.ca>

On Mon, Oct 24, 2011 at 02:54:49PM +0200, Grant Likely wrote:

> You'll still need a 'struct gpio;' forward decl in asm-generic/gpio.h,
> but that's better than having two copies.  If you craft the patch,
> I'll make sure some build coverage testing is performed before merging
> it.

Actually I don't think we don't need the forward declaration as we can
just declare the struct prior to including the asm header.  Patch to
follow...

^ permalink raw reply

* dmix - unable to open slave
From: Nenad Sljivic @ 2011-10-24 13:17 UTC (permalink / raw)
  To: alsa-devel


Hi,

I posted the same questions on alsa-user group, but no one could help me, so
I might have more luck here.


I am trying to enable a software mixer on an MIPS based embedded target
board using alsa-lib v1.0.23.

When I try to play two audio files using these commands:

#aplay -vDplug:dmix song1.wav &
#aplay -vDplug:dmix song2.wav 

mixing works fine.

For some strange reason when I try the same thing using the "nenad_dmix"
device I am getting the following error:

ALSA lib pcm_dmix.c:1068:(snd_pcm_dmix_open) unable to open slave
aplay: main:654: audio open error: Invalid argument

The error occurs while trying to open device for the second time (song2.wav
playback). At the same time, song1.wav plays fine.


The content of my .asoundrc is given bellow:

pcm.nenad_dmix {
        type plug
        slave.pcm "dmixer"
}

pcm.dmixer  {
        type dmix
        ipc_key 1024
        ipc_key_add_uid false
        ipc_perm 0666
        slave {
    pcm "hw:0,0"
    period_time 0
    period_size 3840
    buffer_size 15360
    rate 48000
    }
}

I narrowed down the problem using the strace tool and it showed me this:

open("/dev/snd/pcmC0D0p", O_RDWR|O_APPEND|O_NONBLOCK|O_CLOEXEC) = -1 EINVAL
(Invalid argument)


What can be the difference between using the plug:dmix and some virtual
device like nenad_dmix in this case ??

Could some of you help me to resolve this issue?

Thanks,
Nenad

^ permalink raw reply

* [U-Boot] [PATCH V3] Ethernut 5 board support
From: Igor Grinberg @ 2011-10-24 13:15 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <4EA53EEB.2040509@egnite.de>

On 10/24/2011 12:33 PM, Tim Schendekehl wrote:
> Add support for the Ethernut 5 open hardware design, based
> on Atmel's AT91SAM9XE512 SoC.
>
> V3
>  - Fix issues with latest git.
>
> Signed-off-by: Tim Schendekehl <tim.schendekehl@egnite.de>
> ---

[...]

>  diff --git a/board/egnite/ethernut5/Makefile b/board/egnite/ethernut5/Makefile
> new file mode 100644
> index 0000000..d8e485f
> --- /dev/null
> +++ b/board/egnite/ethernut5/Makefile

[...]

> +
> +clean:
> +	rm -f $(SOBJS) $(OBJS)
> +
> +distclean:	clean
> +	rm -f $(LIB) core *.bak $(obj).depend

You shouldn't be adding this.
Please, see the commit 464c79207c89f247f97b344495924eabb0c9738e
(punt unused clean/distclean targets) by Mike.


[...]

> diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c
> new file mode 100644
> index 0000000..50c4cb3
> --- /dev/null
> +++ b/board/egnite/ethernut5/ethernut5.c

[...]

> +#ifdef CONFIG_CMD_NAND
> +static void ethernut5_nand_hw_init(void)
> +{
> +	struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
> +	struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
> +	unsigned long csa;
> +
> +	/* Assign CS3 to NAND/SmartMedia Interface */
> +	csa = readl(&matrix->ebicsa);
> +	csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
> +	writel(csa, &matrix->ebicsa);
> +
> +	/* Configure SMC CS3 for NAND/SmartMedia */
> +	writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
> +		AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
> +		&smc->cs[3].setup);
> +	writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
> +		AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
> +		&smc->cs[3].pulse);
> +	writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
> +		&smc->cs[3].cycle);
> +	writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
> +		AT91_SMC_MODE_EXNW_DISABLE |
> +		AT91_SMC_MODE_DBW_8 |
> +		AT91_SMC_MODE_TDF_CYCLE(2),
> +		&smc->cs[3].mode);
> +
> +#ifdef CONFIG_SYS_NAND_READY_PIN
> +	/* Ready pin is optional. */
> +	at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
> +#endif
> +	at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
> +
> +

Please, remove these 2 empty lines.

> +}
> +#endif
> +
> +/*
> + * This is called first during late initialization.
> + */
> +int board_init(void)
> +{
> +	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> +
> +	/* Enable clocks for all PIOs */
> +	writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
> +		(1 << ATMEL_ID_PIOC),
> +		&pmc->pcer);
> +
> +	/* Enable ctrl+c. */
> +	console_init_f();

This one has already been called in the init_sequence array.
Why do you need to call it the second time?

> +	/* Set our official architecture number. */
> +	gd->bd->bi_arch_number = 1971; /*MACH_TYPE_ETHERNUT5*/

This should be done in the board config file.
Please, read the README file (CONFIG_MACH_TYPE option).

> +	/* Set adress of boot parameters. */
> +	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
> +	/* Initialize UARTs and power management. */
> +	at91_seriald_hw_init();
> +	ethernut5_power_init();
> +
> +	ethernut5_nand_hw_init();
> +
> +#ifdef CONFIG_HAS_DATAFLASH
> +	at91_spi0_hw_init(1 << 0);
> +#endif
> +	return 0;
> +}

[...]

> +#ifdef CONFIG_GENERIC_ATMEL_MCI
> +int board_mmc_init(bd_t *bd)
> +{
> +	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> +
> +	/* Enable MCI clock. */
> +	writel(1 << ATMEL_ID_MCI,
> +		&pmc->pcer);

Why not leave this on the same line?

> +
> +	/* Initialize MCI hardware. */
> +	at91_mci_hw_init();
> +	/* Register the device. */
> +	return atmel_mci_init((void *)ATMEL_BASE_MCI);
> +}

[...]


Regards,
Igor.

^ permalink raw reply

* [GIT PULL] (xen) stable/bug.fixes-3.2 and stable/mmu.fixes for Linux 3.2-rc0
From: Konrad Rzeszutek Wilk @ 2011-10-24 12:55 UTC (permalink / raw)
  To: torvalds, linux-kernel
  Cc: dario.faggioli, stefano.stabellini, dan.magenheimer, dgdegra

[-- Attachment #1: Type: text/plain, Size: 3499 bytes --]

Hey Linus,

Please pull the following two branches:

git pull git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen stable/bug.fixes-3.2 stable/mmu.fixes

which contain bug-fixes to various subsystems in Xen. I am not too thrilled
that this GIT pull is all over the place, but sadly that is the nature of some
bug fixes. I could split this up in small branches but not sure whether that would
be worth it?

Anyhow, there are two branches, wherein:

#stable/bug.fixes-3.2 is based of commit a102a9ece5489e1718cd7543aa079082450ac3a2 (Linux 3.1-rc8)
and contains bug fixes found when I ran the static analyzer tool "smatch".
Most of the bugs were for the error logic path - so I am quite happy that those
are fixed now.

#stable/mmu.fixes is based of commit 322a8b034003c0d46d39af85bf24fee27b902f48 (Linux 3.1-rc1)
and contains fixes to the Xen debugfs - one attribute got lost when Jeremy did the
move from home-grown tracing to using the tracing API. Another fix is to remove
a CONFIG_DEBUG option that was causing more grief that neccessary - so removing it.

The more serious bug-fixes are in the grant mechanism - Stefano found out that when
QEMU is mapping user pages and using AIO, the kernel AIO subsystem also maps those pages.
Which in effect means that there are two page mappings for a guest page - in the
userland and in the kernel. The grant table mechanism only dealt with the
userland pages so AIO ended up getting garbage.

We also fix a sleep-inside-spinlock bug and the self-ballooning mechanism
(it was squeezing the kernel too much causing an OOM).

Anyhow, the credit list is as follow:

Dan Magenheimer (1):
      xen: Fix selfballooning and ensure it doesn't go too far

Daniel De Graaf (1):
      xen/gntdev: Fix sleep-inside-spinlock

Konrad Rzeszutek Wilk (10):
      Revert "xen/debug: WARN_ON when identity PFN has no _PAGE_IOMAP flag set."
      xen/p2m: Make debug/xen/mmu/p2m visible again.
      xen/p2m: Use SetPagePrivate and its friends for M2P overrides.
      xen/events: BUG() when we can't allocate our event->irq array.
      xen/events: Don't check the info for NULL as it is already done.
      xen/irq: If we fail during msi_capability_init return proper error code.
      xen/xenbus: Remove the unnecessary check.
      xen/enlighten: Fix compile warnings and set cx to known value.
      xen/p2m/debugfs: Fix potential pointer exception.
      xen/p2m/debugfs: Make type_name more obvious.

Stefano Stabellini (2):
      xen: add an "highmem" parameter to alloc_xenballooned_pages
      xen: modify kernel mappings corresponding to granted pages

 arch/x86/include/asm/xen/page.h           |    6 +-
 arch/x86/pci/xen.c                        |   10 ++-
 arch/x86/xen/Kconfig                      |    8 --
 arch/x86/xen/enlighten.c                  |    1 +
 arch/x86/xen/mmu.c                        |   52 ------------
 arch/x86/xen/p2m.c                        |  128 ++++++++++++++++++++++++----
 drivers/block/xen-blkback/blkback.c       |    2 +-
 drivers/xen/balloon.c                     |   12 ++-
 drivers/xen/events.c                      |   10 ++-
 drivers/xen/gntdev.c                      |   39 ++++++++-
 drivers/xen/grant-table.c                 |    6 +-
 drivers/xen/xen-selfballoon.c             |   67 ++++++++++++++-
 drivers/xen/xenbus/xenbus_probe_backend.c |    2 -
 include/xen/balloon.h                     |    5 +-
 include/xen/grant_table.h                 |    1 +
 15 files changed, 238 insertions(+), 111 deletions(-)

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply


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.