ti_gpio.c (aa0d25b7a1595721908d0be91e40f54e4aa62b43) | ti_gpio.c (9346e9130d7ae72b1a6fadb36de85c835074b883) |
---|---|
1/*- 2 * Copyright (c) 2011 Ben Gray <ben.r.gray@gmail.com>. 3 * Copyright (c) 2014 Luiz Otavio O Souza <loos@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 890 unchanged lines hidden (view full) --- 899 sc->sc_isrcs[irq].tgi_mask = TI_GPIO_MASK(irq); 900 sc->sc_isrcs[irq].tgi_mode = GPIO_INTR_CONFORM; 901 902 error = intr_isrc_register(&sc->sc_isrcs[irq].tgi_isrc, 903 sc->sc_dev, 0, "%s,%u", name, irq); 904 if (error != 0) 905 return (error); /* XXX deregister ISRCs */ 906 } | 1/*- 2 * Copyright (c) 2011 Ben Gray <ben.r.gray@gmail.com>. 3 * Copyright (c) 2014 Luiz Otavio O Souza <loos@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 890 unchanged lines hidden (view full) --- 899 sc->sc_isrcs[irq].tgi_mask = TI_GPIO_MASK(irq); 900 sc->sc_isrcs[irq].tgi_mode = GPIO_INTR_CONFORM; 901 902 error = intr_isrc_register(&sc->sc_isrcs[irq].tgi_isrc, 903 sc->sc_dev, 0, "%s,%u", name, irq); 904 if (error != 0) 905 return (error); /* XXX deregister ISRCs */ 906 } |
907 return (intr_pic_register(sc->sc_dev, 908 OF_xref_from_node(ofw_bus_get_node(sc->sc_dev)))); | 907 if (intr_pic_register(sc->sc_dev, 908 OF_xref_from_node(ofw_bus_get_node(sc->sc_dev))) == NULL) 909 return (ENXIO); 910 911 return (0); |
909} 910 911static int 912ti_gpio_pic_detach(struct ti_gpio_softc *sc) 913{ 914 915 /* 916 * There has not been established any procedure yet --- 460 unchanged lines hidden --- | 912} 913 914static int 915ti_gpio_pic_detach(struct ti_gpio_softc *sc) 916{ 917 918 /* 919 * There has not been established any procedure yet --- 460 unchanged lines hidden --- |