tsl2560.c (810ebad6) tsl2560.c (9b06f7ae)
1/* $OpenBSD: tsl2560.c,v 1.1 2005/11/15 22:23:20 kettenis Exp $ */
1/* $OpenBSD: tsl2560.c,v 1.2 2005/12/27 17:18:18 deraadt Exp $ */
2
3/*
4 * Copyright (c) 2005 Mark Kettenis
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

--- 47 unchanged lines hidden (view full) ---

57 NULL, "tsl", DV_DULL
58};
59
60int
61tsl_match(struct device *parent, void *match, void *aux)
62{
63 struct i2c_attach_args *ia = aux;
64
2
3/*
4 * Copyright (c) 2005 Mark Kettenis
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

--- 47 unchanged lines hidden (view full) ---

57 NULL, "tsl", DV_DULL
58};
59
60int
61tsl_match(struct device *parent, void *match, void *aux)
62{
63 struct i2c_attach_args *ia = aux;
64
65 if (ia->ia_compat) {
66 if (strcmp(ia->ia_compat, "tsl2560") == 0)
67 return (1);
68 return (0);
69 }
70 return (1); /* accept the address given */
65 if (strcmp(ia->ia_name, "tsl2560") == 0)
66 return (1);
67 return (0);
71}
72
73void
74tsl_attach(struct device *parent, struct device *self, void *aux)
75{
76 struct tsl_softc *sc = (struct tsl_softc *)self;
77 struct i2c_attach_args *ia = aux;
78 u_int8_t cmd, data;

--- 158 unchanged lines hidden ---
68}
69
70void
71tsl_attach(struct device *parent, struct device *self, void *aux)
72{
73 struct tsl_softc *sc = (struct tsl_softc *)self;
74 struct i2c_attach_args *ia = aux;
75 u_int8_t cmd, data;

--- 158 unchanged lines hidden ---