From dfbc6a61a0ebbaecbb84000157c16fa8eb16bc55 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 11 Feb 2013 17:05:57 +0100 Subject: scripts: Auto-detect CSV format in tools handling CSV input --- scripts/csv2sto.py | 6 +++++- scripts/plotcsv.py | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/csv2sto.py b/scripts/csv2sto.py index 4275fb1..c43a990 100755 --- a/scripts/csv2sto.py +++ b/scripts/csv2sto.py @@ -121,7 +121,11 @@ def main(): fd_sto.write("\n") fds_csv = [ open(f_csv, 'r') for f_csv in fs_csv ] - crs = [ csv.reader(fd_csv, delimiter=',') for fd_csv in fds_csv ] + crs = [] + for fd_csv in fds_csv: + dialect = csv.Sniffer().sniff(fd_csv.read(1024)) + fd_csv.seek(0) + crs.append(csv.reader(fd_csv, dialect)) times = np.zeros((tot_nRows, len(fds_csv))) vals = np.zeros((tot_nRows, len(fds_csv))) diff --git a/scripts/plotcsv.py b/scripts/plotcsv.py index fd6d084..1d26354 100755 --- a/scripts/plotcsv.py +++ b/scripts/plotcsv.py @@ -41,7 +41,10 @@ def plot(x, y, x_max, y_max, x_name, y_name, title, cubic, linear, xnew=None, f= def read_and_plot_csv(csv_file, cubic, linear, x_max=X_MAX, y_max=Y_MAX): print("Reading data...") - reader = csv.reader(open(csv_file, 'r'), delimiter=',') + cf = open(csv_file, 'r') + dialect = csv.Sniffer().sniff(cf.read(1024)) + cf.seek(0) + reader = csv.reader(cf, dialect) x_name,y_name = reader.next() # header line X = np.array([[float(_x), float(_y)] for _x,_y in reader ]) -- cgit v1.2.3-54-g00ecf s'> summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2016-10-15 21:17:16 +0200
committerMark Brown <broonie@kernel.org>2016-10-24 18:40:11 +0100
commit0f40132d5d68a3226085013e24ac02aa37586850 (patch)
tree6a270d73cdf9df2da5817d29f223b7bcf776e59a /Documentation/media/uapi
parent1001354ca34179f3db924eb66672442a173147dc (diff)
ASoC: es8328: Remove some unused defines
The es8328 drivers seems to have used the wm8753 driver as a template. Its header file contains a few defines that are copied verbatim from the wm8753 header that do not really apply to this driver and are unused. So remove those defines. This seems safe as they deal with PLL and clock divider settings and the es8328 driver neither implements a set_pll() nor a set_clkdiv() callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/media/uapi')